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