summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/gdx/boardgame/boards
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/gdx/boardgame/boards')
-rw-r--r--core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java5
-rw-r--r--core/src/ch/asynk/gdx/boardgame/boards/SquareBoard.java3
-rw-r--r--core/src/ch/asynk/gdx/boardgame/boards/TriangleBoard.java5
3 files changed, 8 insertions, 5 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java
index 30aef0b..c78fb77 100644
--- a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java
+++ b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java
@@ -33,8 +33,9 @@ public class HexBoard implements Board
// rows are vertical°
// bottom left is the left vertice of the most bottom-left horizontal hex side of the map
- private static final int [] vAngles = {330, -1, 30, 90, 150, -1, 210, 270, 330};
- private static final int [] hAngles = { 0, 0, 60, -1, 120, 180, 240, -1, 300};
+ // [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};
public HexBoard(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 bfe23a7..665d1ca 100644
--- a/core/src/ch/asynk/gdx/boardgame/boards/SquareBoard.java
+++ b/core/src/ch/asynk/gdx/boardgame/boards/SquareBoard.java
@@ -8,7 +8,8 @@ public class SquareBoard implements Board
private final float x0; // bottom left x offset
private final float y0; // bottom left y offset
- private static final int [] angles = { 0, 0, -1, 90, -1, 180, -1, 270, -1};
+ // [0] is 0° facing East
+ private static final int [] angles = {90, 0, -1, 90, -1, 180, -1, 270, -1, 0};
public SquareBoard(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 f49550d..1fbd034 100644
--- a/core/src/ch/asynk/gdx/boardgame/boards/TriangleBoard.java
+++ b/core/src/ch/asynk/gdx/boardgame/boards/TriangleBoard.java
@@ -16,8 +16,9 @@ public class TriangleBoard implements Board
private final float h23; // 2/3 height of the triangle
private final float h43; // 4/3 height of the triangle
- private static final int [] vAngles = {330, -1, 30, 90, 150, -1, 210, 270, 330};
- private static final int [] hAngles = { 0, 0, 60, -1, 120, 180, 240, -1, 300};
+ // [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};
public TriangleBoard(float side, float x0, float y0, BoardFactory.BoardOrientation boardOrientation)
{