aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/game/game_state.cpp4
-rw-r--r--src/main/game/global_cache.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/main/game/game_state.cpp b/src/main/game/game_state.cpp
index 097c744..a6186ff 100644
--- a/src/main/game/game_state.cpp
+++ b/src/main/game/game_state.cpp
@@ -277,13 +277,17 @@ void game_state::undo_move(const move m) {
// reorders the pile refs so that the largest pile is first
void game_state::place_card(pile_ref pr, card c) {
piles[pr].place(c);
+#ifndef NO_PILE_SYMMETRY
eval_pile_order(pr, true);
+#endif
}
// Same as above but for taking cards
card game_state::take_card(pile_ref pr) {
card c = piles[pr].take();
+#ifndef NO_PILE_SYMMETRY
eval_pile_order(pr, false);
+#endif
return c;
}
diff --git a/src/main/game/global_cache.cpp b/src/main/game/global_cache.cpp
index 37738f2..5d2fd79 100644
--- a/src/main/game/global_cache.cpp
+++ b/src/main/game/global_cache.cpp
@@ -84,7 +84,7 @@ void cached_game_state::add_card(card c, const game_state& gs) {
#endif
switch (gs.rules.build_pol) {
-#ifdef SIMPLE_HASH
+#ifdef NO_CARD_SYMMETRY
default:
target.emplace_back(c);
break;
@@ -152,7 +152,7 @@ std::size_t hasher::combine(std::size_t& seed, std::size_t value) const {
size_t hasher::hash_value(card const& c) const {
boost::hash<uint8_t> boost_hasher;
-#ifdef SIMPLE_HASH
+#ifdef NO_CARD_SYMMETRY
uint8_t suit_val = c.get_suit();
#else
uint8_t suit_val;