summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/gdx/boardgame/Orientation.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/Orientation.java b/core/src/ch/asynk/gdx/boardgame/Orientation.java
index 677c979..e5c906b 100644
--- a/core/src/ch/asynk/gdx/boardgame/Orientation.java
+++ b/core/src/ch/asynk/gdx/boardgame/Orientation.java
@@ -62,6 +62,12 @@ public enum Orientation
return (o.r == -1) ? o.right() : o;
}
+ public Orientation opposite()
+ {
+ if (s <= NW.s) return fromS(this.s << 4);
+ return fromS(this.s >> 4);
+ }
+
public static Orientation fromS(int s)
{
if (s == E.s) return E;