Browse Source

refactoring: removed one constructor in Map

remotes/origin/menu
fdai7910 11 months ago
parent
commit
8823cd5128
  1. 2
      src/main/java/pacmanGame/GameManager.java
  2. 7
      src/main/java/pacmanGame/Map.java

2
src/main/java/pacmanGame/GameManager.java

@ -13,7 +13,7 @@ public class GameManager {
}
public void setupGame(){
map = new Map();
map = new Map(Map.mapClassic);
visualizer = new VisualizerPlainText(this);
player = new Player(this);
player.Spawn();

7
src/main/java/pacmanGame/Map.java

@ -3,7 +3,8 @@ package pacmanGame;
import java.util.HashMap;
public class Map {
public final String[] mapClassic = {
public static String[] mapClassic = {
"wwwwwwwwwwwwwwwwwwwwwwwwwwwwww",
"wwwwwwwwwwwwwwwwwwwwwwwwwwwwww",
"ww............ww............ww",
@ -52,10 +53,6 @@ public class Map {
public Vector2 playerSpawn = new Vector2(2,2);
public char playerSpawnChar = 's';
public Map() {
GenerateMap(mapClassic);
}
public Map(String[] mapData) {
GenerateMap(mapData);
}

Loading…
Cancel
Save