aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/move.cpp
diff options
context:
space:
mode:
authorCharlie Blake2018-06-26 10:37:54 +0100
committerCharlie Blake2018-06-26 10:37:54 +0100
commit797400ea32ac1f6588e834fc1bcb42aa67fa6863 (patch)
tree16352c5245f2f94dadf31c3e510eedfc9254fc3d /src/main/game/move.cpp
parentAdd test to make sure cache encodes face up (diff)
downloadmetasol-797400ea32ac1f6588e834fc1bcb42aa67fa6863.tar.gz
metasol-797400ea32ac1f6588e834fc1bcb42aa67fa6863.zip

Finished klondike correct impl

Diffstat (limited to 'src/main/game/move.cpp')
-rw-r--r--src/main/game/move.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/game/move.cpp b/src/main/game/move.cpp
index ff8269c..9e45c66 100644
--- a/src/main/game/move.cpp
+++ b/src/main/game/move.cpp
@@ -4,16 +4,22 @@
#include "move.h"
-move::move(mtype ty, pile::ref f, pile::ref t, pile::size_type i) : type(ty), from(f), to(t), count(i) {
+move::move(mtype ty, pile::ref f, pile::ref t, pile::size_type i, bool reveal_move_) :
+ type(ty), from(f), to(t), count(i), reveal_move(reveal_move_) {
#ifndef NDEBUG
if (ty == mtype::regular) assert(i == 1);
else assert(i >= 1);
#endif
}
+void move::make_reveal_move() {
+ reveal_move = true;
+}
+
bool operator==(const move& a, const move& b) {
return (a.from == b.from )
&& (a.to == b.to )
&& (a.count == b.count)
- && (a.type == b.type );
+ && (a.type == b.type )
+ && (a.reveal_move == b.reveal_move);
}