diff --git a/src/main/java/pacmanGame/GameManager.java b/src/main/java/pacmanGame/GameManager.java index 172cbd3..6c60efb 100644 --- a/src/main/java/pacmanGame/GameManager.java +++ b/src/main/java/pacmanGame/GameManager.java @@ -7,6 +7,7 @@ public class GameManager { public Visualizer visualizer; public Player player; public int score = 0; + public Boolean ghostIsEdible = false; public GameManager() { setupGame(); @@ -77,4 +78,11 @@ public class GameManager { public void updatePlayerCell() { map.GetCell(player.position).triggerItem(); } + + public void makeGhostEdible(int timeStopPillEffect) { + ghostIsEdible = true; + if(time == timeStopPillEffect) { + ghostIsEdible = false; + } + } }