diff --git a/src/main/java/pacmanGame/GameManager.java b/src/main/java/pacmanGame/GameManager.java index 0063ad3..96160ca 100644 --- a/src/main/java/pacmanGame/GameManager.java +++ b/src/main/java/pacmanGame/GameManager.java @@ -37,13 +37,23 @@ public class GameManager { ghosts[i].move(); } } + switch (time) { + case 300: + spawnCherry(); + case 600: + destroyCherry(); + default: + break; + } + time++; + /* if(time == 300) { spawnCherry(); } if (time == 600) { destroyCherry(); - } - time++; + }*/ + } public void spawnCherry() {