Implemented rotate

This commit is contained in:
Bokros Bálint 2016-04-25 21:14:37 +02:00
parent fbdb7ba867
commit 6810ec02bc

View File

@ -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