diff --git a/src/main/java/pacmanGame/Map.java b/src/main/java/pacmanGame/Map.java index b9d45d4..b53711e 100644 --- a/src/main/java/pacmanGame/Map.java +++ b/src/main/java/pacmanGame/Map.java @@ -81,12 +81,12 @@ public class Map { public Cell findCellByString(String target) { for (int x = 0; x < size.x; x++) { for (int y = 0; y < size.y; y++) { - if (cells[x][y].type == target) { + if (cells[x][y].type.equals(target)) { return cells[x][y]; } } } - + System.out.println("couldnt find cell " + target); return null; } }