From cf356806c573c2368616ea5806d576acdad17a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bokros=20B=C3=A1lint?= Date: Mon, 25 Apr 2016 20:42:53 +0200 Subject: [PATCH] Implemented move in Tester --- cicaprojekt/Tester.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/cicaprojekt/Tester.java b/cicaprojekt/Tester.java index 8586feb..7cdd9dd 100644 --- a/cicaprojekt/Tester.java +++ b/cicaprojekt/Tester.java @@ -24,14 +24,26 @@ public class Tester { return dungeon; } - - void listPlayers() { System.out.println(oneill); System.out.println(jaffa); System.out.println(replicator); } + void move(String param) { + switch (param) { + case "O" : + oneill.move(oneill.getFacingDirection()); + break; + case "J" : + jaffa.move(jaffa.getFacingDirection()); + break; + default: + //TODO error handling + break; + } + } + /* custom Test annotation */ @Target(ElementType.METHOD) // it's for methods @Retention(RetentionPolicy.RUNTIME) // we want to retain annotations in runtime