From ac23dc2e9dfa2bacfbdfccafe392cbef48a6320a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 4 Jun 2020 14:50:00 +0200 Subject: HexBoard : LOS, must set from to not blocked --- core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java | 3 +++ 1 file changed, 3 insertions(+) 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)) { -- cgit v1.1-2-g2b99