summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/gdx
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/gdx')
-rw-r--r--core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java32
1 files changed, 9 insertions, 23 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java
index 7ea7bad..19a5306 100644
--- a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java
+++ b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java
@@ -434,30 +434,16 @@ public class HexBoard implements Board
else
return (dx == 1 ? Orientation.NE : Orientation.SW);
}
- if (vertical) {
- if (dx == 1) {
- if (dy == 1)
- return Orientation.NE;
- else
- return Orientation.SE;
- } else {
- if (dy == 1)
- return Orientation.NW;
- else
- return Orientation.SW;
- }
+ if (dx == 1) {
+ if (dy == 1)
+ return (vertical ? Orientation.NE : Orientation.E);
+ else
+ return (vertical ? Orientation.SE : Orientation.SE);
} else {
- if (dx == 1) {
- if (dy == 1)
- return Orientation.E;
- else
- return Orientation.SE;
- } else {
- if (dy == 1)
- return Orientation.NW;
- else
- return Orientation.W;
- }
+ if (dy == 1)
+ return (vertical ? Orientation.NW : Orientation.NW);
+ else
+ return (vertical ? Orientation.SW : Orientation.W);
}
}