diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2020-05-31 20:04:36 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2020-05-31 20:04:36 +0200 |
commit | 89fa215e25ce703251f596339bbc6f54e57a0fce (patch) | |
tree | 29e7349b63d1efa240470e609a57c996827c3cee /core/src/ch/asynk/gdx/boardgame | |
parent | 57bebfaade1651e4de7f5ff49063937b4f427c5b (diff) | |
download | gdx-boardgame-89fa215e25ce703251f596339bbc6f54e57a0fce.zip gdx-boardgame-89fa215e25ce703251f596339bbc6f54e57a0fce.tar.gz |
TriangleBoard : clean up
Diffstat (limited to 'core/src/ch/asynk/gdx/boardgame')
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/boards/TriangleBoard.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/boards/TriangleBoard.java b/core/src/ch/asynk/gdx/boardgame/boards/TriangleBoard.java index 1a16772..c90d351 100644 --- a/core/src/ch/asynk/gdx/boardgame/boards/TriangleBoard.java +++ b/core/src/ch/asynk/gdx/boardgame/boards/TriangleBoard.java @@ -19,7 +19,6 @@ public class TriangleBoard implements Board private final float m; // h / d private final float h13; // 1/3 height of the triangle private final float h23; // 2/3 height of the triangle - private final float h43; // 4/3 height of the triangle // [0] is 0° facing East // [8] is default @@ -42,7 +41,6 @@ public class TriangleBoard implements Board this.m = this.h / this.d; this.h13 = this.h * 0.33333f; this.h23 = this.h * 0.66666f; - this.h43 = this.h * 1.33333f; this.adjacents = new Tile[3]; } @@ -60,8 +58,9 @@ public class TriangleBoard implements Board @Override public Tile[] getAdjacents() { return adjacents; } - @Override public void buildAdjacents(int x, int y, TileProvider tileProvider) // FIXME + @Override public void buildAdjacents(int x, int y, TileProvider tileProvider) { + // FIXME } @Override public int genKey(int x, int y) @@ -158,9 +157,9 @@ public class TriangleBoard implements Board case EUCLIDEAN: return 0; // FIXME case TAXICAB: - return dx + dy; // move should only be allowed through the 3 sides not through de vertices - case TCHEBYCHEV: return dx + dy; + case TCHEBYCHEV: + return (dx > dy ? dx : dy); } return -1; } |