diff options
author | Tor Andersson <tor@ccxvii.net> | 2025-01-29 12:50:33 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2025-01-29 12:50:33 +0100 |
commit | 824a97661b0a634fd03c3ba3cd34ae56daf25c97 (patch) | |
tree | 5e17a0ad9d4994a63460d33ddd3b85ecbf9b6ca0 /rules.js | |
parent | 96a91ed29eb0901b4f88f2b0c1a7fc9c807c066d (diff) | |
download | maria-824a97661b0a634fd03c3ba3cd34ae56daf25c97.tar.gz |
fix retreats into neutral spaces
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -4262,11 +4262,14 @@ function is_illegal_cross_map_retreat(from, to) { // search all possible retreat paths of given length function search_retreat_possible_dfs(result, seen, here, range) { + let pow = piece_power[game.selected[0]] for (let next of data.cities.adjacent[here]) { if (seen.includes(next)) continue if (has_any_piece(next)) continue + if (is_forbidden_neutral_space(pow, next)) + continue if (is_illegal_cross_map_retreat(here, next)) continue if (range === 1) { |