aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthecharlesblake2018-09-29 15:15:38 +0100
committerthecharlesblake2018-09-29 15:15:38 +0100
commit162b86e7d94d51afec5c1161850d75ebadce9dee (patch)
tree80f615148bee020622fc5b345ca21c20e0941ddf
parentCorrect legal moves for found base & remove wraps (diff)
downloadmetasol-162b86e7d94d51afec5c1161850d75ebadce9dee.tar.gz
metasol-162b86e7d94d51afec5c1161850d75ebadce9dee.zip

Fix reserve-foundation bug

-rw-r--r--src/main/game/search-state/game_state.legal_moves.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/game/search-state/game_state.legal_moves.cpp b/src/main/game/search-state/game_state.legal_moves.cpp
index 6f167b4..7194930 100644
--- a/src/main/game/search-state/game_state.legal_moves.cpp
+++ b/src/main/game/search-state/game_state.legal_moves.cpp
@@ -157,7 +157,7 @@ vector<move> game_state::get_legal_moves(move parent_move) {
if (rules.reserve_size > 0) from_piles.insert(from_piles.end(), reserve.begin(), reserve.end());
for (auto fp : from_piles) {
- if (piles[fp].empty() || parent_move.to == fp) continue;
+ if (piles[fp].empty() || (parent_move.to == fp && parent_move.type != move::mtype::dominance)) continue;
for (auto f : foundations)
if (is_valid_foundations_move(fp, f))