diff options
Diffstat (limited to 'node/keepdiceexecnode.cpp')
| -rw-r--r-- | node/keepdiceexecnode.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/node/keepdiceexecnode.cpp b/node/keepdiceexecnode.cpp index 40a3fce..ab961af 100644 --- a/node/keepdiceexecnode.cpp +++ b/node/keepdiceexecnode.cpp @@ -48,7 +48,7 @@ void KeepDiceExecNode::run(ExecutionNode* previous) m_errors.insert(TOO_MANY_DICE,QObject::tr(" You ask to keep %1 dice but the result only has %2").arg(m_numberOfDice).arg(diceList.size())); } - foreach(Die* tmp,diceList.mid(m_numberOfDice,-1)) + for(Die* tmp : diceList.mid(m_numberOfDice,-1)) { tmp->setHighlighted(false); } @@ -86,3 +86,15 @@ qint64 KeepDiceExecNode::getPriority() const return priority; } + +ExecutionNode* KeepDiceExecNode::getCopy() const +{ + KeepDiceExecNode* node = new KeepDiceExecNode(); + node->setDiceKeepNumber(m_numberOfDice); + if(NULL!=m_nextNode) + { + node->setNextNode(m_nextNode->getCopy()); + } + return node; + +} |