added rotateLeft and rotateRight methods to ONeill
This commit is contained in:
parent
b7b182cf7d
commit
017e24a484
@ -50,7 +50,40 @@ public class ONeill implements Destroyable{
|
|||||||
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.boxLift()");
|
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.boxLift()");
|
||||||
Menu.removeTab();
|
Menu.removeTab();
|
||||||
boxLifted = (Box) currentTile.getAdjacentTile(facingDirection).removeItemFromTile();
|
boxLifted = (Box) currentTile.getAdjacentTile(facingDirection).removeItemFromTile();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void rotateLeft() {
|
||||||
|
switch (facingDirection) {
|
||||||
|
case NORTH:
|
||||||
|
facingDirection = Direction.WEST;
|
||||||
|
break;
|
||||||
|
case WEST:
|
||||||
|
facingDirection = Direction.SOUTH;
|
||||||
|
break;
|
||||||
|
case SOUTH:
|
||||||
|
facingDirection = Direction.EAST;
|
||||||
|
break;
|
||||||
|
case EAST:
|
||||||
|
facingDirection = Direction.NORTH;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void rotateRight() {
|
||||||
|
switch (facingDirection) {
|
||||||
|
case NORTH:
|
||||||
|
facingDirection = Direction.EAST;
|
||||||
|
break;
|
||||||
|
case EAST:
|
||||||
|
facingDirection = Direction.SOUTH;
|
||||||
|
break;
|
||||||
|
case SOUTH:
|
||||||
|
facingDirection = Direction.WEST;
|
||||||
|
break;
|
||||||
|
case WEST:
|
||||||
|
facingDirection = Direction.NORTH;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void boxDrop() {
|
public void boxDrop() {
|
||||||
|
Loading…
Reference in New Issue
Block a user