From 7fbc0405828a1d71b8a2ef0a14e2476adc1550cb Mon Sep 17 00:00:00 2001 From: Charlie Blake Date: Wed, 4 Jul 2018 14:35:42 +0100 Subject: Add variants for streamliner cmd line options --- src/main/game/global_cache.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main/game/global_cache.cpp') diff --git a/src/main/game/global_cache.cpp b/src/main/game/global_cache.cpp index 2cec338..ee2a2b8 100644 --- a/src/main/game/global_cache.cpp +++ b/src/main/game/global_cache.cpp @@ -8,12 +8,14 @@ #include "global_cache.h" #include "../input-output/output/log_helper.h" +#include "search-state/game_state.h" using namespace std; using namespace boost; typedef sol_rules::build_policy pol; typedef sol_rules::stock_deal_type sdt; +typedef game_state::streamliner_options sos; typedef boost::multi_index::multi_index_container< cached_game_state, @@ -81,7 +83,9 @@ void cached_game_state::add_card(card c, const game_state& gs) { // If the game is a 'hole-based' game, or suit-reduction is on, reduces // the cached suit of the card where possible - bool is_suit_symmetry = gs.streamliners || gs.rules.hole; + bool is_suit_symmetry = gs.stream_opts == sos::SUIT_SYMMETRY + || gs.stream_opts == sos::BOTH + || gs.rules.hole; if (is_suit_symmetry) { switch (gs.rules.build_pol) { @@ -135,7 +139,9 @@ size_t hasher::hash_value(card const& c) const { // If the game is a 'hole-based' game, or suit-reduction is enabled, hash // the reduced suit - bool is_suit_symmetry = init_gs.streamliners || init_gs.rules.hole; + bool is_suit_symmetry = init_gs.stream_opts == sos::SUIT_SYMMETRY + || init_gs.stream_opts == sos::BOTH + || init_gs.rules.hole; uint8_t suit_val; if (is_suit_symmetry) { -- cgit v1.2.1