summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/tankontank/engine/Board.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java
index 6bab3d0..6616b0b 100644
--- a/core/src/ch/asynk/tankontank/engine/Board.java
+++ b/core/src/ch/asynk/tankontank/engine/Board.java
@@ -28,6 +28,7 @@ public abstract class Board extends Image implements Disposable
{
public enum Orientation
{
+ ALL(0, 63),
KEEP(0, 0),
NORTH(270, 1),
NORTH_EAST(210, 2),
@@ -62,11 +63,16 @@ public abstract class Board extends Image implements Disposable
else return fromSide(s << 1);
}
- public Orientation oppositeSide()
+ public Orientation opposite()
{
return left().left().left();
}
+ public int allBut()
+ {
+ return ALL.s & (s ^ 0xFFFF);
+ }
+
public int getFrontSides()
{
return s | left().s | right().s;
@@ -74,7 +80,7 @@ public abstract class Board extends Image implements Disposable
public int getBackSides()
{
- return oppositeSide().getFrontSides();
+ return opposite().getFrontSides();
}
public static Orientation fromSide(int s)