diff options
Diffstat (limited to 'core/src/ch/asynk/gdx')
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/Orientation.java | 6 |
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; |