aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/move.cpp
diff options
context:
space:
mode:
authorCharlie Blake2018-06-26 12:02:44 +0100
committerGitHub2018-06-26 12:02:44 +0100
commitb3f79030aef87d9bd0a543bac603f1c2cb697718 (patch)
tree9a67e59d1752dcd0e6c68be71b995abaf63781ed /src/main/game/move.cpp
parentMerge pull request #70 from thecharlesblake/ipg (diff)
parentFinished klondike correct impl (diff)
downloadmetasol-b3f79030aef87d9bd0a543bac603f1c2cb697718.tar.gz
metasol-b3f79030aef87d9bd0a543bac603f1c2cb697718.zip

Merge pull request #71 from thecharlesblake/correct-klondike

Correct klondike

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);
}