This commit is contained in:
Hegedus Fanni 2016-04-25 21:48:28 +02:00
commit 70fd002f47

View File

@ -8,13 +8,28 @@ public abstract class Tile {
protected Map<Direction, Tile> adjacentTile;
protected ZPM zpmOnTile;
protected Stack<Box> boxStack;
protected int x, y;
protected int y = -666;
protected int x = -666;
public Tile() {
adjacentTile = new HashMap<Direction, Tile>();
}
public int getX() { return this.x; }
public int getY() { return this.y; }
public void setX(int x) {
if (x >= 0)
this.x = x;
}
public void setY(int y) {
if (y >= 0)
this.y = y;
}
public Tile getAdjacentTile(Direction direction) {
return adjacentTile.get(direction);
}