From 98d888b696d2af6646ba770a3498e13128a4e740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjist=C3=B3f?= Date: Sat, 23 Apr 2016 13:35:53 +0200 Subject: [PATCH] fixed the order of output identing in Wall.spawnStargate() --- cicaprojekt/Wall.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/cicaprojekt/Wall.java b/cicaprojekt/Wall.java index 3e4b016..f857b4d 100644 --- a/cicaprojekt/Wall.java +++ b/cicaprojekt/Wall.java @@ -1,19 +1,18 @@ package cicaprojekt; public class Wall extends Tile { - private Stargate sg; + public void spawnStargate(Stargate stargate, Direction direction) { Menu.addTab(); - System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + - "]" + Menu.tabulator + "Wall.spawnStargate(stargate," + direction.name() + ")"); - Menu.removeTab(); + System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Wall.spawnStargate(stargate," + direction.name() + ")"); if(sg == null) sg = stargate; - else return; - System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + - "]" + Menu.tabulator + "Wall.spawnStargate()"); + else + return; + System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Wall.spawnStargate()"); + Menu.removeTab(); } public void clearStargate(){ @@ -25,16 +24,14 @@ public class Wall extends Tile { } - public void onEntry() - { + public void onEntry() { Menu.addTab(); System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Wall.onEntry()"); System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Wall.onEntry()"); Menu.removeTab(); } - public void onExit() - { + public void onExit() { Menu.addTab(); System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Wall.onExit()"); System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Wall.onExit()");