From 94965f70fb9960f06ab8b02bff9b80e24f6d734f Mon Sep 17 00:00:00 2001 From: hegedusfanni Date: Tue, 29 Mar 2016 02:19:57 +0200 Subject: [PATCH] added echoes to the Tile class --- cicaprojekt/Tile.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) 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(); + } }