From 5d2e2ba668c29315129b2dfee9c4778bc1165717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 7 Jul 2020 17:53:48 +0200 Subject: HexBoard : offboard tiles are blocking --- core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java index 2e4079b..4cb07f4 100644 --- a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java +++ b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java @@ -385,6 +385,8 @@ public class HexBoard implements Board t.blocked = losBlocked; if (t.blockLos(from, to, d, distance(x0, y0, x, y, Board.Geometry.EUCLIDEAN))) blocked |= 0x01; + } else { + blocked |= 0x01; } if (flat) @@ -399,6 +401,8 @@ public class HexBoard implements Board t.blocked = losBlocked; if (t.blockLos(from, to, d, distance(x0, y0, x, y, Board.Geometry.EUCLIDEAN))) blocked |= 0x02; + } else { + blocked |= 0x02; } if (flat) @@ -418,6 +422,8 @@ public class HexBoard implements Board contact = true; } losBlocked = (t.blocked || t.blockLos(from, to, d, distance(x0, y0, x, y, Board.Geometry.EUCLIDEAN))); + } else { + losBlocked = true; } } -- cgit v1.1-2-g2b99