diff options
-rw-r--r-- | assets/data/engineer.png | bin | 32766 -> 33217 bytes | |||
-rw-r--r-- | assets/data/panzer.png | bin | 29309 -> 27591 bytes | |||
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/Orientation.java | 22 | ||||
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java | 5 | ||||
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/boards/SquareBoard.java | 3 | ||||
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/boards/TriangleBoard.java | 5 |
6 files changed, 21 insertions, 14 deletions
diff --git a/assets/data/engineer.png b/assets/data/engineer.png Binary files differindex 35d4665..39214e4 100644 --- a/assets/data/engineer.png +++ b/assets/data/engineer.png diff --git a/assets/data/panzer.png b/assets/data/panzer.png Binary files differindex 787f7ff..8c2fbc7 100644 --- a/assets/data/panzer.png +++ b/assets/data/panzer.png diff --git a/core/src/ch/asynk/gdx/boardgame/Orientation.java b/core/src/ch/asynk/gdx/boardgame/Orientation.java index 166830a..8450dff 100644 --- a/core/src/ch/asynk/gdx/boardgame/Orientation.java +++ b/core/src/ch/asynk/gdx/boardgame/Orientation.java @@ -29,15 +29,19 @@ public enum Orientation public static void setValues(int [] angles) { - DEFAULT.r = angles[0]; - E.r = angles[1]; - NE.r = angles[2]; - N.r = angles[3]; - NW.r = angles[4]; - W.r = angles[5]; - SW.r = angles[6]; - S.r = angles[7]; - SE.r = angles[8]; + for (int i = 0; i < angles.length; i++) { + if (angles[i] < 0 && angles[i] != -1) + angles[i] += 360; + } + E.r = angles[0]; + NE.r = angles[1]; + N.r = angles[2]; + NW.r = angles[3]; + W.r = angles[4]; + SW.r = angles[5]; + S.r = angles[6]; + SE.r = angles[7]; + DEFAULT.r = angles[8]; } public int allBut() diff --git a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java index 00704ef..688e1a0 100644 --- a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java +++ b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java @@ -38,8 +38,9 @@ public class HexBoard implements Board // bottom left is the left vertice of the most bottom-left horizontal hex side of the map // [0] is 0° facing East - private static final int [] vAngles = {60, 0, 60, -1, 120, 180, 240, -1, 300}; - private static final int [] hAngles = {90, -1, 30, 90, 150, -1, 210, 270, 330}; + // [8] is default + private static final int [] vAngles = {-90, -30, -1, 30, 90, 150, -1, 210, -30}; + private static final int [] hAngles = { -1, -60, 0, 60, -1, 120, 180, 240, -60}; public HexBoard(int cols, int rows, float side, float x0, float y0, BoardFactory.BoardOrientation boardOrientation) { diff --git a/core/src/ch/asynk/gdx/boardgame/boards/SquareBoard.java b/core/src/ch/asynk/gdx/boardgame/boards/SquareBoard.java index 7f5de42..7e381e9 100644 --- a/core/src/ch/asynk/gdx/boardgame/boards/SquareBoard.java +++ b/core/src/ch/asynk/gdx/boardgame/boards/SquareBoard.java @@ -11,7 +11,8 @@ public class SquareBoard implements Board private final float y0; // bottom left y offset // [0] is 0° facing East - private static final int [] angles = {90, 0, -1, 90, -1, 180, -1, 270, -1, 0}; + // [8] is default + private static final int [] angles = {0, -1, 90, -1, 180, -1, 270, -1, 0, 90}; public SquareBoard(int cols, int rows, float side, float x0, float y0) { diff --git a/core/src/ch/asynk/gdx/boardgame/boards/TriangleBoard.java b/core/src/ch/asynk/gdx/boardgame/boards/TriangleBoard.java index 4c9a013..2ea7237 100644 --- a/core/src/ch/asynk/gdx/boardgame/boards/TriangleBoard.java +++ b/core/src/ch/asynk/gdx/boardgame/boards/TriangleBoard.java @@ -19,8 +19,9 @@ public class TriangleBoard implements Board private final float h43; // 4/3 height of the triangle // [0] is 0° facing East - private static final int [] vAngles = {60, 0, 60, -1, 120, 180, 240, -1, 300}; - private static final int [] hAngles = {30, -1, 30, 90, 150, -1, 210, 270, 330}; + // [8] is default + private static final int [] vAngles = {-1, 30, 90, 150, -1, 210, 270, 330, 30}; + private static final int [] hAngles = { 0, 60, -1, 120, 180, 240, -1, 300, 60}; public TriangleBoard(int cols, int rows, float side, float x0, float y0, BoardFactory.BoardOrientation boardOrientation) { |