Browse Source

refactoring: new Function setupGame initialized

remotes/origin/menu
fdai2751 11 months ago
parent
commit
33e43bb6d3
  1. 7
      src/main/java/pacmanGame/GameManager.java

7
src/main/java/pacmanGame/GameManager.java

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

Loading…
Cancel
Save