summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/gdx/boardgame/boards
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2020-06-09 07:14:43 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2020-06-09 07:14:43 +0200
commit3eef4dae35c7b939c2c8ede377f6274b6a67d81c (patch)
tree5fc21d8f4a2688c5ebc6e78b10cbfbea8dabd978 /core/src/ch/asynk/gdx/boardgame/boards
parent0676f408a404c7afef27225dd81b6a8c952c4a98 (diff)
downloadgdx-boardgame-3eef4dae35c7b939c2c8ede377f6274b6a67d81c.zip
gdx-boardgame-3eef4dae35c7b939c2c8ede377f6274b6a67d81c.tar.gz
Piece : add atLeastOneTileMove()
Diffstat (limited to 'core/src/ch/asynk/gdx/boardgame/boards')
-rw-r--r--core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java
index 639741e..e04f91e 100644
--- a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java
+++ b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java
@@ -492,7 +492,7 @@ public class HexBoard implements Board
if (cost == Integer.MAX_VALUE) continue; // impracticable
int r = src.acc - cost;
- if (r < 0 && src != from) continue; // allow at least 1 tile move
+ if (r < 0 && !(src == from && piece.atLeastOneTileMove())) continue; // allow at least 1 tile move
if (dst.searchCount != searchCount) {
dst.searchCount = searchCount;