aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/global_cache.cpp
diff options
context:
space:
mode:
authorIan Gent2018-06-26 16:43:45 +0100
committerIan Gent2018-06-26 16:43:45 +0100
commit0798cfe1ecb92996ed7959383dcc4b8b0d51a1d9 (patch)
treef6f6dbd927012de317feea6b2bb25d466cff1ac3 /src/main/game/global_cache.cpp
parentfirst R file (diff)
parentMerge pull request #71 from thecharlesblake/correct-klondike (diff)
downloadmetasol-0798cfe1ecb92996ed7959383dcc4b8b0d51a1d9.tar.gz
metasol-0798cfe1ecb92996ed7959383dcc4b8b0d51a1d9.zip

Merge branch ‘master’ of github.com:thecharlesblake/Solvitaire into ipg

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) {