diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2020-07-07 17:53:48 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2020-07-07 17:53:48 +0200 |
commit | 5d2e2ba668c29315129b2dfee9c4778bc1165717 (patch) | |
tree | e30a74dba0ae207b1d87e6479ad9dbdede0ac472 | |
parent | 3d220da8560c3afce889c9ad0642043b91cbaab8 (diff) | |
download | gdx-boardgame-5d2e2ba668c29315129b2dfee9c4778bc1165717.zip gdx-boardgame-5d2e2ba668c29315129b2dfee9c4778bc1165717.tar.gz |
HexBoard : offboard tiles are blocking
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java | 6 |
1 files changed, 6 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 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; } } |