aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/move.cpp
diff options
context:
space:
mode:
authorCharlie Blake2018-07-06 17:27:39 +0100
committerGitHub2018-07-06 17:27:39 +0100
commit0e685d6e4a343daab945f5fb7d0cf250c077b6ff (patch)
tree634eede8d39d3e313c1206cb2b9a6f6205570f8c /src/main/game/move.cpp
parentMerge pull request #74 from thecharlesblake/sol-streamliner-variants (diff)
parentRefactor k-plus impl to simplify and fix deal1 bug (diff)
downloadmetasol-0e685d6e4a343daab945f5fb7d0cf250c077b6ff.tar.gz
metasol-0e685d6e4a343daab945f5fb7d0cf250c077b6ff.zip

Merge pull request #75 from thecharlesblake/refactor-rules-json

Refactor rules json

Diffstat (limited to 'src/main/game/move.cpp')
-rw-r--r--src/main/game/move.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/game/move.cpp b/src/main/game/move.cpp
index 915bac6..528b631 100644
--- a/src/main/game/move.cpp
+++ b/src/main/game/move.cpp
@@ -4,11 +4,12 @@
#include "move.h"
-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_) {
+move::move(mtype ty, pile::ref f, pile::ref t, int8_t count_, bool reveal_move_, bool flip_waste_) :
+ type(ty), from(f), to(t), count(count_), reveal_move(reveal_move_), flip_waste(flip_waste_) {
#ifndef NDEBUG
- if (ty == mtype::regular) assert(i == 1);
- else if (ty != mtype::stock_k_plus) assert(i >= 1);
+ if (ty == mtype::regular) assert(count == 1);
+ if (ty == mtype::stock_k_plus) assert(!reveal_move_);
+ if (ty != mtype::stock_k_plus) assert(count >= 1 && !flip_waste_);
#endif
}