From 4c209e2f5ab9ed7574a9b73eb96687dc5ae77391 Mon Sep 17 00:00:00 2001 From: Charlie Blake Date: Fri, 6 Jul 2018 17:25:53 +0100 Subject: Refactor k-plus impl to simplify and fix deal1 bug --- src/main/game/move.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main/game/move.h') diff --git a/src/main/game/move.h b/src/main/game/move.h index 5e6892f..27ba279 100644 --- a/src/main/game/move.h +++ b/src/main/game/move.h @@ -10,7 +10,7 @@ struct move { enum class mtype : uint8_t {regular, dominance, built_group, stock_k_plus, stock_to_all_tableau, null}; - explicit move(mtype, pile::ref = 255 , pile::ref = 255, pile::size_type = 1, bool reveal_move_ = false); + explicit move(mtype, pile::ref = 255 , pile::ref = 255, int8_t = 1, bool reveal_move_ = false, bool flip_waste_ = false); friend bool operator==(const move&, const move&); void make_reveal_move(); @@ -18,8 +18,11 @@ struct move { mtype type; pile::ref from; pile::ref to; - pile::size_type count; + // For built piles the size of the pile, or for stock k-plus moves, + // the number of cards to be moved from the stock to the waste before the waste card is played on the foundations + int8_t count; bool reveal_move; + bool flip_waste; }; #endif //SOLVITAIRE_MOVE_H -- cgit v1.2.1