From 4de8cf5796446b7f8b09d776e4a6a6d6b8e95cb6 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sat, 4 Jan 2014 16:24:54 +0100 Subject: -Adding range, booleancondition and countexecutenode. --- node/keepdiceexecnode.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 node/keepdiceexecnode.cpp (limited to 'node/keepdiceexecnode.cpp') diff --git a/node/keepdiceexecnode.cpp b/node/keepdiceexecnode.cpp new file mode 100644 index 0000000..cd2b76e --- /dev/null +++ b/node/keepdiceexecnode.cpp @@ -0,0 +1,27 @@ +#include "keepdiceexecnode.h" + +KeepDiceExecNode::KeepDiceExecNode() +{ +} + +void KeepDiceExecNode::run(ExecutionNode* previous) +{ + if(NULL==previous) + { + return; + } + QList diceList=previous->getResult()->getResultList(); + QList diceList2=m_result.getResultList(); + + + diceList2 = diceList.mid(0,m_numberOfDice); + m_result.setResultList(diceList2); + if(NULL!=m_nextNode) + { + m_nextNode->run(this); + } +} +void KeepDiceExecNode::setDiceKeepNumber(quint64 n) +{ + m_numberOfDice = n; +} -- cgit v1.2.3-70-g09d2