diff options
| author | Charlie Blake | 2018-06-21 15:13:19 +0100 |
|---|---|---|
| committer | GitHub | 2018-06-21 15:13:19 +0100 |
| commit | 4c617d49ce2fc162f25379df7715de34c0bbc349 (patch) | |
| tree | 49d507a2024cdbbf68be95719ff60d4fee04fc99 /src/main/game/global_cache.cpp | |
| parent | Merge pull request #64 from thecharlesblake/solvability-csv-output (diff) | |
| parent | Fixup randomness (diff) | |
| download | metasol-4c617d49ce2fc162f25379df7715de34c0bbc349.tar.gz metasol-4c617d49ce2fc162f25379df7715de34c0bbc349.zip | |
Merge pull request #65 from thecharlesblake/solvability-improvements
Solvability improvements
Diffstat (limited to 'src/main/game/global_cache.cpp')
| -rw-r--r-- | src/main/game/global_cache.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/main/game/global_cache.cpp b/src/main/game/global_cache.cpp index db0c6de..f688c33 100644 --- a/src/main/game/global_cache.cpp +++ b/src/main/game/global_cache.cpp @@ -81,13 +81,7 @@ 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.rules.hole; -#ifdef SUIT_REDUCTION_STREAMLINER - is_suit_symmetry = true; -#endif -#ifdef NO_SUIT_SYMMETRY - is_suit_symmetry = false; -#endif + bool is_suit_symmetry = gs.streamliners || gs.rules.hole; if (is_suit_symmetry) { switch (gs.rules.build_pol) { @@ -141,13 +135,7 @@ 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.rules.hole; -#ifdef SUIT_REDUCTION_STREAMLINER - is_suit_symmetry = true; -#endif -#ifdef NO_SUIT_SYMMETRY - is_suit_symmetry = false; -#endif + bool is_suit_symmetry = init_gs.streamliners || init_gs.rules.hole; uint8_t suit_val; if (is_suit_symmetry) { |
