From 3262a0fa366cefbb9633410364298bf3a1d81818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjist=C3=B3f?= Date: Mon, 28 Mar 2016 22:59:16 +0200 Subject: [PATCH] fixed echos in ZPM and Wall classes --- cicaprojekt/Wall.java | 22 ++++++++++++++-------- cicaprojekt/ZPM.java | 6 ++++-- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/cicaprojekt/Wall.java b/cicaprojekt/Wall.java index 04c3692..ee326c3 100644 --- a/cicaprojekt/Wall.java +++ b/cicaprojekt/Wall.java @@ -5,10 +5,12 @@ public class Wall extends Tile { private Stargate sg; public void spawnStargate(Stargate stargate, Direction direction) { - System.out.println("[" + ":" + this.getClass().getSimpleName() + - "]" + ">" + Menu.tabulator + "Wall.spawnStargate(stargate," + direction.name() + ")"); - System.out.println("[" + ":" + this.getClass().getSimpleName() + - "]" + "<" + Menu.tabulator + "Wall.spawnStargate()"); + Menu.addTab(); + System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + + "]" + Menu.tabulator + "Wall.spawnStargate(stargate," + direction.name() + ")"); + System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + + "]" + Menu.tabulator + "Wall.spawnStargate()"); + Menu.removeTab(); if(sg == null) sg = stargate; else return; @@ -20,14 +22,18 @@ public class Wall extends Tile { public void onEntry() { - System.out.println("[" + ":" + this.getClass().getSimpleName() + "]" + ">" + Menu.tabulator + "Wall.onEntry()"); - System.out.println("[" + ":" + this.getClass().getSimpleName() + "]" + "<" + Menu.tabulator + "Wall.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() { - System.out.println("[" + ":" + this.getClass().getSimpleName() + "]" + ">" + Menu.tabulator + "Wall.onExit()"); - System.out.println("[" + ":" + this.getClass().getSimpleName() + "]" + "<" + Menu.tabulator + "Wall.onExit()"); + Menu.addTab(); + System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Wall.onExit()"); + System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Wall.onExit()"); + Menu.removeTab(); } } diff --git a/cicaprojekt/ZPM.java b/cicaprojekt/ZPM.java index cbad680..3e2b826 100644 --- a/cicaprojekt/ZPM.java +++ b/cicaprojekt/ZPM.java @@ -5,8 +5,10 @@ public class ZPM implements cicaprojekt.Pickable public void pick() { - System.out.println("[" + ":" + this.getClass().getSimpleName() + "]" + ">" + Menu.tabulator + "ZPM.pick()"); - System.out.println("[" + ":" + this.getClass().getSimpleName() + "]" + "<" + Menu.tabulator + "ZPM.pick()"); + Menu.addTab(); + System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ZPM.pick()"); + System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ZPM.pick()"); + Menu.removeTab(); } }