Implemented rotate
This commit is contained in:
parent
fbdb7ba867
commit
6810ec02bc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user