aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/global_cache.cpp
diff options
context:
space:
mode:
authorCharlie Blake2018-06-21 15:13:19 +0100
committerGitHub2018-06-21 15:13:19 +0100
commit4c617d49ce2fc162f25379df7715de34c0bbc349 (patch)
tree49d507a2024cdbbf68be95719ff60d4fee04fc99 /src/main/game/global_cache.cpp
parentMerge pull request #64 from thecharlesblake/solvability-csv-output (diff)
parentFixup randomness (diff)
downloadmetasol-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.cpp16
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) {