diff options
| author | Charlie Blake | 2018-07-04 14:35:42 +0100 |
|---|---|---|
| committer | Charlie Blake | 2018-07-04 14:35:42 +0100 |
| commit | 7fbc0405828a1d71b8a2ef0a14e2476adc1550cb (patch) | |
| tree | f84aa2ae3c1a2c7e141a306c85932fda2fd91355 /src/main/game/global_cache.cpp | |
| parent | Add 10% timeout for str and make rerun (diff) | |
| download | metasol-7fbc0405828a1d71b8a2ef0a14e2476adc1550cb.tar.gz metasol-7fbc0405828a1d71b8a2ef0a14e2476adc1550cb.zip | |
Add variants for streamliner cmd line options
Diffstat (limited to 'src/main/game/global_cache.cpp')
| -rw-r--r-- | src/main/game/global_cache.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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) { |
