Browse Source

Refactoring: setupGame()

main
fdai2751 11 months ago
parent
commit
6f4b77ba53
  1. 5
      src/main/java/pacmanGame/GameManager.java

5
src/main/java/pacmanGame/GameManager.java

@ -16,14 +16,15 @@ public class GameManager {
public int moveSpeed;
public GameManager() {
livesRemaining = 3;
failedAttempts = 0;
setupGame();
}
public void setupGame(){
time = 0;
moveSpeed = 5;
livesRemaining = 3;
failedAttempts = 0;
ghosts = new Ghost[ghostCount];
for (int i = 0; i < ghosts.length; i++) {
ghosts[i] = new Ghost(this, i);

Loading…
Cancel
Save