From 6810ec02bc9de16d412732cbc909c64ef1586ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bokros=20B=C3=A1lint?= Date: Mon, 25 Apr 2016 21:14:37 +0200 Subject: [PATCH] Implemented rotate --- cicaprojekt/Tester.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/cicaprojekt/Tester.java b/cicaprojekt/Tester.java index 657d8cc..f4179ec 100644 --- a/cicaprojekt/Tester.java +++ b/cicaprojekt/Tester.java @@ -55,6 +55,29 @@ public class Tester { } } + void rotate(String playerParam, String directionParam) { + switch (playerParam) { + case "O" : + switch (directionParam) { + case "L" : + oneill.rotateLeft(); + break; + case "R" : + oneill.rotateRight(); + break; + } + case "J" : + switch (directionParam) { + case "L" : + jaffa.rotateLeft(); + break; + case "R" : + jaffa.rotateRight(); + break; + } + } + } + /* custom Test annotation */ @Target(ElementType.METHOD) // it's for methods @Retention(RetentionPolicy.RUNTIME) // we want to retain annotations in runtime