diff options
| author | Ian Gent | 2018-06-26 16:43:45 +0100 |
|---|---|---|
| committer | Ian Gent | 2018-06-26 16:43:45 +0100 |
| commit | 0798cfe1ecb92996ed7959383dcc4b8b0d51a1d9 (patch) | |
| tree | f6f6dbd927012de317feea6b2bb25d466cff1ac3 /src/main/game/move.cpp | |
| parent | first R file (diff) | |
| parent | Merge pull request #71 from thecharlesblake/correct-klondike (diff) | |
| download | metasol-0798cfe1ecb92996ed7959383dcc4b8b0d51a1d9.tar.gz metasol-0798cfe1ecb92996ed7959383dcc4b8b0d51a1d9.zip | |
Merge branch ‘master’ of github.com:thecharlesblake/Solvitaire into ipg
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); } |
