Lux-Design-S1 icon indicating copy to clipboard operation
Lux-Design-S1 copied to clipboard

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

Open StoneT2000 opened this issue 4 years ago • 2 comments

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

StoneT2000 avatar Jul 10 '21 17:07 StoneT2000

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;```

holypegasus avatar Jul 17 '21 23:07 holypegasus

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.

StoneT2000 avatar Jul 21 '21 17:07 StoneT2000