diff options
| author | Charlie Blake | 2018-06-08 21:54:48 +0100 |
|---|---|---|
| committer | Charlie Blake | 2018-06-08 21:54:48 +0100 |
| commit | a7396c5497601855fad019cfd145ca6c93e1c40f (patch) | |
| tree | 99bdf08b2eb8f15c38a4ddb74c68d45bacd0fae1 /src/main/game/move.h | |
| parent | Fix built move bug and add unit tests (diff) | |
| download | metasol-a7396c5497601855fad019cfd145ca6c93e1c40f.tar.gz metasol-a7396c5497601855fad019cfd145ca6c93e1c40f.zip | |
Refactor moves logic
Diffstat (limited to 'src/main/game/move.h')
| -rw-r--r-- | src/main/game/move.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/game/move.h b/src/main/game/move.h index 81a6116..b852811 100644 --- a/src/main/game/move.h +++ b/src/main/game/move.h @@ -8,12 +8,15 @@ #include "pile.h" struct move { - move(pile::ref , pile::ref, pile::size_type = 1); - bool is_dominance() const; + enum class mtype {regular, dominance, built_group, stock_to_waste, stock_to_tableau, redeal, null}; + + explicit move(mtype, pile::ref = 255 , pile::ref = 255, pile::size_type = 1); friend bool operator==(const move&, const move&); - const static pile::size_type dominance_flag; - pile::ref from; pile::ref to; pile::size_type count; + mtype type; + pile::ref from; + pile::ref to; + pile::size_type count; }; |
