aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/game_state.cpp
diff options
context:
space:
mode:
authorCharlie Blake2018-02-02 19:31:55 +0000
committerGitHub2018-02-02 19:31:55 +0000
commitb74b1f9b0d2b1e6956dc8bae692468a70589a625 (patch)
tree6533b4e28e6e750681775b54a3137c3931b9ef07 /src/main/game/game_state.cpp
parentMerge pull request #34 from thecharlesblake/reduced_state (diff)
parentAdd flag for toggling pile order symmetry & both (diff)
downloadmetasol-b74b1f9b0d2b1e6956dc8bae692468a70589a625.tar.gz
metasol-b74b1f9b0d2b1e6956dc8bae692468a70589a625.zip

Merge pull request #35 from thecharlesblake/symmetry-debug-flags

Symmetry debug flags

Diffstat (limited to 'src/main/game/game_state.cpp')
-rw-r--r--src/main/game/game_state.cpp4
1 files changed, 4 insertions, 0 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;
}