Lux-AI-Challenge / Lux-Design-S1

Home to the design and engine of the @Lux-AI-Challenge Season 1, hosted on @kaggle
https://lux-ai.org/
Apache License 2.0
897 stars 151 forks source link

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

Open StoneT2000 opened 3 years ago

StoneT2000 commented 3 years ago

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

holypegasus commented 3 years ago

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 commented 3 years ago

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.