Ghost WIP
This commit is contained in:
@ -14,4 +14,14 @@ public enum Direction {
|
||||
this.dx = dx;
|
||||
this.dy = dy;
|
||||
}
|
||||
|
||||
public Direction opposite() {
|
||||
switch (this) {
|
||||
case RIGHT: return LEFT;
|
||||
case LEFT: return RIGHT;
|
||||
case DOWN: return UP;
|
||||
case UP: return DOWN;
|
||||
default: return NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user