added echoes to the Tile class

This commit is contained in:
hegedusfanni 2016-03-29 02:19:57 +02:00 committed by Kjistóf
parent b1f38c6afc
commit 94965f70fb

View File

@ -6,11 +6,11 @@ public abstract class Tile {
protected Map<Direction, Tile> adjacentTile;
private Pickable itemOnTile;
public void setAdajacentTile(Tile newTile, Direction direction) {
adjacentTile.put(direction, newTile);
}
public Tile getAdjacentTile(Direction direction) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Tile.getAdjacentTile(" + direction.name() + ")");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Tile.getAdjacentTile(" + direction.name() + ")");
Menu.removeTab();
return adjacentTile.get(direction);
}
@ -21,12 +21,21 @@ public abstract class Tile {
public abstract void onExit();
public Pickable removeItemFromTile() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Tile.removeItemFromTile()");
Pickable item = itemOnTile;
itemOnTile = null;
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Tile.removeItemFromTile()");
Menu.removeTab();
return item;
}
public void setItemOnTile(Pickable item) {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Tile.setItemOnTile(" + item.name() + ")");
itemOnTile = item;
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Tile.setItemOnTile(" + item.name() + ")");
Menu.removeTab();
}
}