aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/search-state
diff options
context:
space:
mode:
authorCharlie Blake2018-06-13 15:38:20 +0100
committerGitHub2018-06-13 15:38:20 +0100
commitccb1232a48deef855d0e0f3ea0f69382494975cc (patch)
treebcc8fe29ea84abbd6682c1a880064a90dd65f959 /src/main/game/search-state
parentMerge pull request #59 from thecharlesblake/paper-tidy-up (diff)
parentAdd default cache capacity of 100,000,000 (diff)
downloadmetasol-ccb1232a48deef855d0e0f3ea0f69382494975cc.tar.gz
metasol-ccb1232a48deef855d0e0f3ea0f69382494975cc.zip

Merge pull request #60 from thecharlesblake/cache-mem-limit

Cache mem limit

Diffstat (limited to 'src/main/game/search-state')
-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 2acfba6..f9fc941 100644
--- a/src/main/game/search-state/game_state.legal_moves.cpp
+++ b/src/main/game/search-state/game_state.legal_moves.cpp
@@ -242,7 +242,7 @@ void game_state::add_built_group_moves(vector<move> &moves) const {
// Finds the size of the built group at the top of a pile
pile::size_type game_state::get_built_group_height(pile::ref ref) const {
pile::size_type i = 1;
- while (is_next_built_group_card(piles[ref][i], piles[ref][i-1]) && i < piles[ref].size())
+ while (i < piles[ref].size() && is_next_built_group_card(piles[ref][i], piles[ref][i-1]))
i++;
return i;
}