@ -3,10 +3,12 @@ package pacmanGame;
public class Cell {
public Vector2 pos;
public String type;
public final Map map;
public Cell(Vector2 pos, String type) {
public Cell(Vector2 pos, String type, Map map) {
this.pos = pos;
this.type = type;
this.map = map;
}
public void triggerDot() {
@ -76,7 +76,7 @@ public class Map {
String cellType = mapTypes.get(String.valueOf(cellChar));
cells[x][y] = new Cell(cellPos, cellType);
cells[x][y] = new Cell(cellPos, cellType, this);
if(cellChar == playerSpawnChar) {
playerSpawn = cellPos.Clone();