Browse Source

refactoring: Fixed invalid return in Map

remotes/origin/menu
fdai2751 11 months ago
parent
commit
9de08b0071
  1. 8
      src/main/java/pacmanGame/Map.java

8
src/main/java/pacmanGame/Map.java

@ -77,6 +77,14 @@ public class Map {
} }
public Cell GetCell(Vector2 pos) { public Cell GetCell(Vector2 pos) {
if(pos.isWithin(size)) {
return cells[pos.x][pos.y]; return cells[pos.x][pos.y];
} }
else {
return cells[0][0];
}
}
} }
Loading…
Cancel
Save