diff --git a/src/main/java/pacmanGame/Cell.java b/src/main/java/pacmanGame/Cell.java index 23f698e..ddafff3 100644 --- a/src/main/java/pacmanGame/Cell.java +++ b/src/main/java/pacmanGame/Cell.java @@ -19,9 +19,9 @@ public class Cell { public void triggerPill() { this.type = "empty"; - gameManager.score += 100; - gameManager.timeStopPillEffect = gameManager.time + 200; - gameManager.ghostIsEdible = true; + map.gameManager.score += 100; + map.gameManager.timeStopPillEffect = map.gameManager.time + 200; + map.gameManager.ghostIsEdible = true; } @@ -45,6 +45,8 @@ public class Cell { map.gameManager.score += 205; } + + public void triggerItem() { if(type.equals("dot")) { triggerDot(); @@ -64,6 +66,7 @@ public class Cell { else if(type.equals("apple")) { triggerApple(); } + else { //System.out.println("cell contains no item!"); }