From 9b2839b6f09177bda6b3654c56a750f84173123a Mon Sep 17 00:00:00 2001 From: rguezennec Date: Thu, 27 Apr 2017 18:17:03 +0200 Subject: -management of arithmetic operator for scalar result of dice. --- die.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'die.h') diff --git a/die.h b/die.h index b0b44ad..7f5cf44 100644 --- a/die.h +++ b/die.h @@ -31,6 +31,10 @@ class Die { public: + /** + * @brief The ArithmeticOperator enum + */ + enum ArithmeticOperator {PLUS,MINUS,DIVIDE,MULTIPLICATION}; /** * @brief Die */ @@ -131,6 +135,9 @@ public: qint64 getMaxValue() const; void setMaxValue(const qint64 &maxValue); + Die::ArithmeticOperator getOp() const; + void setOp(const Die::ArithmeticOperator &op); + private: qint64 m_value; QList m_rollResult; @@ -142,7 +149,10 @@ private: qint64 m_base; QString m_color; + Die::ArithmeticOperator m_op; + std::mt19937 m_rng; + }; -- cgit v1.2.3-70-g09d2