aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node/dicerollernode.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@buf.com>2015-05-15 14:48:45 +0200
committerRenaud G <renaud@buf.com>2015-05-15 14:48:45 +0200
commit03cae353e4a070391850118b5c7e2b5ce4c8828f (patch)
tree7ad21d6b910146cbb43a01938458eb0c7d67fea2 /node/dicerollernode.cpp
parent74b931cd4dd5af57ee7e34948a92dad62733d722 (diff)
downloadOneRoll-03cae353e4a070391850118b5c7e2b5ce4c8828f.tar.gz
OneRoll-03cae353e4a070391850118b5c7e2b5ce4c8828f.zip
add management of base, the minimum value of die
Diffstat (limited to 'node/dicerollernode.cpp')
-rw-r--r--node/dicerollernode.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/node/dicerollernode.cpp b/node/dicerollernode.cpp
index f32a033..06148fc 100644
--- a/node/dicerollernode.cpp
+++ b/node/dicerollernode.cpp
@@ -32,8 +32,8 @@
//////////////////////////////////////////////////
/// \brief DiceRollerNode::DiceRollerNode
//////////////////////////////////////////////////
-DiceRollerNode::DiceRollerNode(quint64 faces)
- : m_faces(faces),m_diceResult(new DiceResult())
+DiceRollerNode::DiceRollerNode(quint64 faces,qint64 offset)
+ : m_faces(faces),m_diceResult(new DiceResult()),m_offset(offset)
{
m_result=m_diceResult;
}
@@ -52,6 +52,7 @@ void DiceRollerNode::run(ExecutionNode* previous)
{
Die* die = new Die();
die->setFaces(m_faces);
+ die->setBase(m_offset);
die->roll();
m_diceResult->insertResult(die);
}