|
@ -8,6 +8,10 @@ public class GameManager { |
|
|
public Player player; |
|
|
public Player player; |
|
|
|
|
|
|
|
|
public GameManager() { |
|
|
public GameManager() { |
|
|
|
|
|
setupGame(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setupGame(){ |
|
|
map = new Map(); |
|
|
map = new Map(); |
|
|
visualizer = new VisualizerPlainText(this); |
|
|
visualizer = new VisualizerPlainText(this); |
|
|
player = new Player(this); |
|
|
player = new Player(this); |
|
@ -15,11 +19,10 @@ public class GameManager { |
|
|
for(int i = 0; i < ghosts.length; i++) { |
|
|
for(int i = 0; i < ghosts.length; i++) { |
|
|
ghosts[i] = new Ghost(this); |
|
|
ghosts[i] = new Ghost(this); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
public void Update() { |
|
|
public void Update() { |
|
|
visualizer.Update(); |
|
|
visualizer.Update(); |
|
|
|
|
|
|
|
|
time++; |
|
|
time++; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|