burlap
burlap copied to clipboard
Agent can try to move out of bounds, throwing an ArrayIndexOutOfBoundsException
https://github.com/jmacglashan/burlap/blob/cc3b09de81f33e6bed8154144a3183dee8595e32/src/main/java/burlap/domain/singleagent/blockdude/BlockDudeModel.java#L138
Because dir can be +1 and ax can be the map.length - 1, the agent can try to move outside the bounds of the map array.
To reproduce, run this test with getLevel1 or getLevel2 instead of getLevel3: https://github.com/jmacglashan/burlap/blob/cc3b09de81f33e6bed8154144a3183dee8595e32/src/test/java/burlap/testing/TestBlockDude.java#L40
any solutions to it instead of modified the source code by my self