Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Casing for resource names in JS kit (and potentially others) #87

Open
StoneT2000 opened this issue Jul 10, 2021 · 2 comments
Open

Casing for resource names in JS kit (and potentially others) #87

StoneT2000 opened this issue Jul 10, 2021 · 2 comments
Assignees

Comments

@StoneT2000
Copy link
Member

Sometimes it's lowercase and sometimes it's all upper case

@holypegasus
Copy link
Contributor

Casing seems internally consistent?

kits/cpp/simple/lux/game_constants.json:6:  "RESOURCE_TYPES": {
Binary file kits/java/simple.zip matches
kits/java/simple/Bot.java:58:              if (cell.resource.type.equals(GameConstants.RESOURCE_TYPES.COAL) && !player.researchedCoal()) continue;
kits/java/simple/Bot.java:59:              if (cell.resource.type.equals(GameConstants.RESOURCE_TYPES.URANIUM) && !player.researchedUranium()) continue;
kits/java/simple/lux/GameConstants.java:9:    public static class RESOURCE_TYPES {
kits/java/simple/lux/game_constants.json:6:  "RESOURCE_TYPES": {
kits/js/simple/lux/game_constants.json:6:  "RESOURCE_TYPES": {
kits/js/simple/main.js:57:            if (cell.resource.type === GAME_CONSTANTS.RESOURCE_TYPES.COAL && !player.researchedCoal()) return;
kits/js/simple/main.js:58:            if (cell.resource.type === GAME_CONSTANTS.RESOURCE_TYPES.URANIUM && !player.researchedUranium()) return;
kits/python/simple/agent.py:6:    from lux.game_map import Cell, RESOURCE_TYPES
kits/python/simple/agent.py:12:    from .lux.game_map import Cell, RESOURCE_TYPES
kits/python/simple/agent.py:66:                    if resource_tile.resource.type == Constants.RESOURCE_TYPES.COAL and not player.researched_coal(): continue
kits/python/simple/agent.py:67:                    if resource_tile.resource.type == Constants.RESOURCE_TYPES.URANIUM and not player.researched_uranium(): continue
kits/python/simple/lux/constants.py:19:    class RESOURCE_TYPES:
kits/python/simple/lux/game_constants.json:6:  "RESOURCE_TYPES": {
kits/python/simple/lux/game_map.py:7:RESOURCE_TYPES = Constants.RESOURCE_TYPES
kits/ts/simple/lux/game_constants.json:6:  "RESOURCE_TYPES": {
kits/ts/simple/main.ts:53:          if (cell.resource.type === GAME_CONSTANTS.RESOURCE_TYPES.COAL && !player.researchedCoal()) return;
kits/ts/simple/main.ts:54:          if (cell.resource.type === GAME_CONSTANTS.RESOURCE_TYPES.URANIUM && !player.researchedUranium()) return;```

@StoneT2000
Copy link
Member Author

oh not quite. So someone was suggesting this. In the GAME_CONSTANTS variable, things like

GAME_CONSTANTS.WORKER_COLLECTION_RATE has 3 fields, "WOOD", "COAL", "URANIUM". But right now for example GAME_CONSTANTS.RESOURCE_TYPES.COAL is equal to "coal" in lower case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants