fix: resolve minor problem in free neighbour search

This commit is contained in:
punchready 2021-07-24 21:40:00 +02:00
parent 154ee9c0f2
commit 23cceb9622
1 changed files with 1 additions and 1 deletions

View File

@ -713,7 +713,7 @@ public class GameLogic {
for(IntVector2 dir: IntVector2.CardinalDirections) {
IntVector2 pos = start.copy().add(dir);
if(pos.getX() < 0 || pos.getX() >= state.mapSize.getX() || pos.getY() < 0 || pos.getY() >= state.mapSize.getY()) {
return options;
continue;
}
if(state.entities.findByPosition(pos).size() == 0) {
options.add(pos);