diff --git a/cicaprojekt/Tile.java b/cicaprojekt/Tile.java index ac32f5c..2bf772a 100644 --- a/cicaprojekt/Tile.java +++ b/cicaprojekt/Tile.java @@ -6,11 +6,11 @@ public abstract class Tile { protected Map 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(); + } }