From a7396c5497601855fad019cfd145ca6c93e1c40f Mon Sep 17 00:00:00 2001 From: Charlie Blake Date: Fri, 8 Jun 2018 21:54:48 +0100 Subject: Refactor moves logic --- src/main/game/move.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/main/game/move.h') 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; }; -- cgit v1.2.1