fix: resolve minor problem in free neighbour search
This commit is contained in:
parent
154ee9c0f2
commit
23cceb9622
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user