Browse Source

Refactoring: update function in GameManager

remotes/origin/ghostsbehaviour
fdai2751 11 months ago
parent
commit
e8a6b32276
  1. 14
      src/main/java/pacmanGame/GameManager.java

14
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() {

Loading…
Cancel
Save