From 0a9202c3ef0d3255ae3d57d0df68f7232396b580 Mon Sep 17 00:00:00 2001 From: Robin Moussu Date: Sat, 26 May 2018 20:08:08 +0200 Subject: add "R" (Reroll until) operator --- node/rerolldicenode.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'node/rerolldicenode.h') diff --git a/node/rerolldicenode.h b/node/rerolldicenode.h index c999dda..8bef6dd 100644 --- a/node/rerolldicenode.h +++ b/node/rerolldicenode.h @@ -18,8 +18,9 @@ public: enum ReRollMode {EQUAL,LESSER,GREATER}; /** * @brief RerollDiceNode + * @param reroll If true reroll the dice only once, otherwise until the condition is false */ - RerollDiceNode(); + RerollDiceNode(bool reroll, bool addingMode); /** * @brief ~RerollDiceNode @@ -40,12 +41,6 @@ public: * @return */ virtual QString toString(bool )const; - - - /** - * @brief setAddingMode - */ - virtual void setAddingMode(bool); /** * @brief getPriority * @return @@ -63,9 +58,11 @@ public: private: DiceResult* m_diceResult = nullptr; - bool m_adding; Validator* m_validator = nullptr; ExecutionNode* m_instruction = nullptr; + + const bool m_reroll; + const bool m_adding; }; #endif // REROLLDICENODE_H -- cgit v1.2.3-70-g09d2