summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java
index acdfd9f..8ddc2e1 100644
--- a/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java
+++ b/core/src/ch/asynk/gdx/boardgame/boards/HexBoard.java
@@ -544,7 +544,7 @@ public class HexBoard implements Board
}
}
- public int possibleMoves(Piece piece, Tile from, Collection<Tile> tiles)
+ @Override public int possibleMoves(Piece piece, Tile from, Collection<Tile> tiles)
{
tiles.clear();
searchCount += 1;
@@ -587,7 +587,7 @@ public class HexBoard implements Board
dst.roadMarch = rm;
stack.push(dst);
tiles.add(dst);
- } else if (r > dst.acc || (!dst.roadMarch && rm)) {
+ } else if (r > dst.acc || (rm && (r + roadMarchBonus > dst.acc + (dst.roadMarch ? roadMarchBonus : 0)))) {
dst.acc = r;
dst.parent = src;
dst.roadMarch = rm;