added rotateLeft and rotateRight methods to ONeill

This commit is contained in:
Bokros Bálint 2016-03-29 00:51:26 +02:00 committed by Kjistóf
parent b7b182cf7d
commit 017e24a484
1 changed files with 34 additions and 1 deletions

View File

@ -50,7 +50,40 @@ public class ONeill implements Destroyable{
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.boxLift()");
Menu.removeTab();
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() {