aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node
diff options
context:
space:
mode:
Diffstat (limited to 'node')
-rw-r--r--node/dicerollernode.cpp2
-rw-r--r--node/ifnode.cpp7
2 files changed, 1 insertions, 8 deletions
diff --git a/node/dicerollernode.cpp b/node/dicerollernode.cpp
index fd92b93..89ba24d 100644
--- a/node/dicerollernode.cpp
+++ b/node/dicerollernode.cpp
@@ -10,7 +10,7 @@
DiceRollerNode::DiceRollerNode(qint64 max,qint64 min)
- : m_max(max),m_diceResult(new DiceResult()),m_min(min)
+ : m_max(max),m_diceResult(new DiceResult()),m_min(min),m_operator(Die::PLUS)
{
m_result=m_diceResult;
}
diff --git a/node/ifnode.cpp b/node/ifnode.cpp
index da852b3..3df60de 100644
--- a/node/ifnode.cpp
+++ b/node/ifnode.cpp
@@ -59,32 +59,25 @@ void IfNode::run(ExecutionNode *previous)
{
for(Die* dice : diceList)
{
- qDebug()<< "dice value:" << dice->getValue();
if(m_validator->hasValid(dice,true,true))
{
- qDebug()<< "true";
nextNode = (nullptr==m_true) ? nullptr: m_true->getCopy();
}
else
{
- qDebug()<< "false";
nextNode = (nullptr==m_false) ? nullptr: m_false->getCopy();
}
- qDebug()<< "dice value:" << dice->getValue() << "next node" << nextNode << "m_true" << m_true;
if(nullptr!=nextNode)
{
if(nullptr==previousLoop->getNextNode())
{
- qDebug() << "iniside loop";
previousLoop->setNextNode(nextNode);
}
if(nullptr==m_nextNode)
{
- qDebug() << "next node" ;
m_nextNode = nextNode;
}
- qDebug() << "before run";
nextNode->run(previousLoop);
previousLoop = getLeafNode(nextNode);
}