summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-09-25 22:46:43 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-09-25 22:46:43 +0200
commit2f00c12baacf40f1de4abe51db9c934c0c298366 (patch)
tree40e507662be6827c4a114f4953e8c18283660ad0 /core/src/ch
parent22dc5fc68ef5e260fc85562fdf3bc875d009e121 (diff)
downloadRustAndDust-2f00c12baacf40f1de4abe51db9c934c0c298366.zip
RustAndDust-2f00c12baacf40f1de4abe51db9c934c0c298366.tar.gz
add Board.Orientation.isInSides(int)
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Board.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java
index 6236478..e709bff 100644
--- a/core/src/ch/asynk/tankontank/engine/Board.java
+++ b/core/src/ch/asynk/tankontank/engine/Board.java
@@ -45,6 +45,11 @@ public abstract class Board extends Image implements Disposable
public float r() { return offset + r; }
+ public boolean isInSides(int sides)
+ {
+ return ((sides & s) == s);
+ }
+
public Orientation left()
{
if (this == NORTH) return NORTH_WEST;