|
@ -9,13 +9,14 @@ public class GameManager { |
|
|
public int score = 0; |
|
|
public int score = 0; |
|
|
public boolean ghostIsEdible = false; |
|
|
public boolean ghostIsEdible = false; |
|
|
public boolean isPaused; |
|
|
public boolean isPaused; |
|
|
|
|
|
public final int ghostCount = 10; |
|
|
|
|
|
|
|
|
public GameManager() { |
|
|
public GameManager() { |
|
|
setupGame(); |
|
|
setupGame(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setupGame(){ |
|
|
public void setupGame(){ |
|
|
ghosts = new Ghost[4]; |
|
|
|
|
|
|
|
|
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); |
|
|
} |
|
|
} |
|
|