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 152 forks source link

Map generation sometimes fails #79

Closed DanielVF closed 3 years ago

DanielVF commented 3 years ago
TypeError: Cannot read property 'hasResource' of undefined
    at Object.generateGame (/opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/Game/gen.js:151:37)
    at Function.<anonymous> (/opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/logic.js:87:38)
    at step (/opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/logic.js:33:23)
    at Object.next (/opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/logic.js:14:53)
    at /opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/logic.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/logic.js:4:12)
    at Function.LuxDesignLogic.initialize (/opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/logic.js:60:16)
    at LuxDesign.<anonymous> (/opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/design.js:67:62)
    at step (/opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/design.js:48:23)
DanielVF commented 3 years ago

Also sometimes (with different numbers as the error):


TypeError: Cannot read property '6' of undefined
    at GameMap.getCell (/opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/GameMap/index.js:44:27)
    at Object.generateGame (/opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/Game/gen.js:151:22)
    at Function.<anonymous> (/opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/logic.js:87:38)
    at step (/opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/logic.js:33:23)
    at Object.next (/opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/logic.js:14:53)
    at /opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/logic.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/logic.js:4:12)
    at Function.LuxDesignLogic.initialize (/opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/logic.js:60:16)
    at LuxDesign.<anonymous> (/opt/homebrew/lib/node_modules/@lux-ai/2021-challenge/lib/es5/design.js:67:62)```
StoneT2000 commented 3 years ago

hm wait i thought this was fixed, will check this out.

StoneT2000 commented 3 years ago

probs fixed in #51 now