diff options
| author | Charlie Blake | 2018-06-26 12:02:44 +0100 |
|---|---|---|
| committer | GitHub | 2018-06-26 12:02:44 +0100 |
| commit | b3f79030aef87d9bd0a543bac603f1c2cb697718 (patch) | |
| tree | 9a67e59d1752dcd0e6c68be71b995abaf63781ed /src/main/game/move.cpp | |
| parent | Merge pull request #70 from thecharlesblake/ipg (diff) | |
| parent | Finished klondike correct impl (diff) | |
| download | metasol-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.cpp | 10 |
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); } |
