Merge branch 'master' of https://github.com/bokrosbalint/cicaprojekt
This commit is contained in:
commit
70fd002f47
@ -8,13 +8,28 @@ public abstract class Tile {
|
|||||||
protected Map<Direction, Tile> adjacentTile;
|
protected Map<Direction, Tile> adjacentTile;
|
||||||
protected ZPM zpmOnTile;
|
protected ZPM zpmOnTile;
|
||||||
protected Stack<Box> boxStack;
|
protected Stack<Box> boxStack;
|
||||||
protected int x, y;
|
protected int y = -666;
|
||||||
|
protected int x = -666;
|
||||||
|
|
||||||
|
|
||||||
public Tile() {
|
public Tile() {
|
||||||
adjacentTile = new HashMap<Direction, 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) {
|
public Tile getAdjacentTile(Direction direction) {
|
||||||
return adjacentTile.get(direction);
|
return adjacentTile.get(direction);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user