summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/gdx
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2020-07-07 17:53:48 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2020-07-07 17:53:48 +0200
commit5d2e2ba668c29315129b2dfee9c4778bc1165717 (patch)
treee30a74dba0ae207b1d87e6479ad9dbdede0ac472 /core/src/ch/asynk/gdx
parent3d220da8560c3afce889c9ad0642043b91cbaab8 (diff)
downloadgdx-boardgame-5d2e2ba668c29315129b2dfee9c4778bc1165717.zip
gdx-boardgame-5d2e2ba668c29315129b2dfee9c4778bc1165717.tar.gz
HexBoard : offboard tiles are blocking
Diffstat (limited to 'core/src/ch/asynk/gdx')
-rw-r--r--core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java6
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;
}
}