summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2020-06-04 14:50:00 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2020-06-04 14:50:00 +0200
commitac23dc2e9dfa2bacfbdfccafe392cbef48a6320a (patch)
tree47fc00fd829664268576227ba5b2c3f4e37a349c
parent40d2fd89e130ffdee44ec1b3896a5e70484f6e6e (diff)
downloadgdx-boardgame-ac23dc2e9dfa2bacfbdfccafe392cbef48a6320a.zip
gdx-boardgame-ac23dc2e9dfa2bacfbdfccafe392cbef48a6320a.tar.gz
HexBoard : LOS, must set from to not blocked
-rw-r--r--core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java
index 22a669d..332898a 100644
--- a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java
+++ b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java
@@ -314,6 +314,7 @@ public class HexBoard implements Board
Tile to = getTile(x1, y1);
float d = distance(x0, y0, x1, y1);
tiles.add(from);
+ from.blocked = false;
boolean losBlocked = false;
while ((x != x1) || (y != y1)) {
if (e > 0) {
@@ -363,6 +364,7 @@ public class HexBoard implements Board
Tile to = getTile(x1, y1);
float d = distance(x0, y0, x1, y1);
tiles.add(from);
+ from.blocked = false;
int blocked = 0;
boolean losBlocked = false;
while ((x != x1) || (y != y1)) {
@@ -411,6 +413,7 @@ public class HexBoard implements Board
Tile to = getTile(x1, y1);
float d = distance(x0, y0, x1, y1);
tiles.add(from);
+ from.blocked = false;
int blocked = 0;
boolean losBlocked = false;
while ((x != x1) || (y != y1)) {