aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/die.h
diff options
context:
space:
mode:
authorrguezennec <renaud@rolisteam.org>2017-04-27 18:17:03 +0200
committerrguezennec <renaud@rolisteam.org>2017-04-27 18:17:03 +0200
commit9b2839b6f09177bda6b3654c56a750f84173123a (patch)
tree259cbab92ad580b11ddd4a01bd8fa53b151a237c /die.h
parent026ca5cb4829cd4c4ad6b945e27479303e96fe82 (diff)
downloadOneRoll-9b2839b6f09177bda6b3654c56a750f84173123a.tar.gz
OneRoll-9b2839b6f09177bda6b3654c56a750f84173123a.zip
-management of arithmetic operator for scalar result of dice.
Diffstat (limited to 'die.h')
-rw-r--r--die.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/die.h b/die.h
index b0b44ad..7f5cf44 100644
--- a/die.h
+++ b/die.h
@@ -32,6 +32,10 @@ class Die
{
public:
/**
+ * @brief The ArithmeticOperator enum
+ */
+ enum ArithmeticOperator {PLUS,MINUS,DIVIDE,MULTIPLICATION};
+ /**
* @brief Die
*/
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<qint64> m_rollResult;
@@ -142,7 +149,10 @@ private:
qint64 m_base;
QString m_color;
+ Die::ArithmeticOperator m_op;
+
std::mt19937 m_rng;
+
};