Browse Source

Merge branch 'ghosts'

remotes/origin/ghostsbehaviour
fdai7753 11 months ago
parent
commit
a9596d3721
  1. 21
      src/main/java/pacmanGame/Map.java

21
src/main/java/pacmanGame/Map.java

@ -21,8 +21,8 @@ public class Map {
"wwwwwww.wweeeeeeeeeeww.wwwwwww", "wwwwwww.wweeeeeeeeeeww.wwwwwww",
"wwwwwww.wwewwwwwwwweww.wwwwwww", "wwwwwww.wwewwwwwwwweww.wwwwwww",
"wwwwwww.wweweeeeeeweww.wwwwwww", "wwwwwww.wweweeeeeeweww.wwwwwww",
"eeeeeee.eeewe0ee2eweee.eeeeeee",
"wwwwwww.wwewe1ee3eweww.wwwwwww",
"eeeeeee.eeew804629weee.eeeeeee",
"wwwwwww.wwewe1573eweww.wwwwwww",
"wwwwwww.wweweeeeeeweww.wwwwwww", "wwwwwww.wweweeeeeeweww.wwwwwww",
"wwwwwww.wwewwwwwwwweww.wwwwwww", "wwwwwww.wwewwwwwwwweww.wwwwwww",
"wwwwwww.wweeeeeeeeeeww.wwwwwww", "wwwwwww.wweeeeeeeeeeww.wwwwwww",
@ -50,10 +50,16 @@ public class Map {
this.put("s", "empty"); this.put("s", "empty");
this.put(".", "dot"); this.put(".", "dot");
this.put("w", "wall"); this.put("w", "wall");
for(int i = 0; i < 10; i++) {
this.put(i+"", "empty");
}
this.put("0", "empty");
this.put("1", "empty");
this.put("2", "empty");
this.put("3", "empty");
this.put("4", "empty");
this.put("5", "empty");
this.put("6", "empty");
this.put("7", "empty");
this.put("8", "empty");
this.put("9", "empty");
}}; }};
@ -69,7 +75,6 @@ public class Map {
} }
public void GenerateMap(String[] mapData) { public void GenerateMap(String[] mapData) {
int sizeY = mapData.length; int sizeY = mapData.length;
int sizeX = mapData[0].length(); int sizeX = mapData[0].length();
@ -87,8 +92,6 @@ public class Map {
cells[x][y] = new Cell(cellPos, cellType, this); cells[x][y] = new Cell(cellPos, cellType, this);
//for(int i = 0; i < gameManager.ghosts.length; i++)
if(cellChar == playerSpawnChar) { if(cellChar == playerSpawnChar) {
playerSpawn = cellPos.Clone(); playerSpawn = cellPos.Clone();
} }

Loading…
Cancel
Save