diff options
| author | 2017-06-03 16:18:28 +0200 | |
|---|---|---|
| committer | 2017-06-03 16:18:28 +0200 | |
| commit | 91d8d763be0f1c2f0eef8bcb4a1b249b52bdb340 (patch) | |
| tree | ba30869be96e17648d4d6eedc21cf8ecaee621a6 | |
| parent | f99aea24fc657b081dccc44390a319b357a803a0 (diff) | |
| parent | 34b4cd544333125ce8301b055e47e5492a95a9fb (diff) | |
| download | OneRoll-91d8d763be0f1c2f0eef8bcb4a1b249b52bdb340.tar.gz OneRoll-91d8d763be0f1c2f0eef8bcb4a1b249b52bdb340.zip | |
Merge branch 'master' of github.com:Rolisteam/DiceParser
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | diceparser.pri | 2 | ||||
| -rw-r--r-- | node/dicerollernode.cpp | 2 | ||||
| -rw-r--r-- | node/ifnode.cpp | 7 | ||||
| -rw-r--r-- | result/diceresult.cpp | 1 |
5 files changed, 5 insertions, 9 deletions
@@ -70,4 +70,4 @@ compute: 100/28 = 3 3*3 = 9 -More examples at : https://github.com/obiwankennedy/DiceParser/blob/master/HelpMe.md +More examples at : https://github.com/Rolisteam/DiceParser/blob/master/HelpMe.md diff --git a/diceparser.pri b/diceparser.pri index 4d73be9..1a1a35d 100644 --- a/diceparser.pri +++ b/diceparser.pri @@ -57,6 +57,7 @@ HEADERS += \ $$PWD/node/mergenode.h \ $$PWD/node/listaliasnode.h \ $$PWD/node/ifnode.h \ + $$PWD/node/splitnode.h \ $$PWD/node/paintnode.h \ $$PWD/node/listsetrollnode.h @@ -78,6 +79,7 @@ SOURCES += \ $$PWD/node/listaliasnode.cpp \ $$PWD/node/paintnode.cpp \ $$PWD/node/ifnode.cpp \ + $$PWD/node/splitnode.cpp \ $$PWD/node/listsetrollnode.cpp 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); } diff --git a/result/diceresult.cpp b/result/diceresult.cpp index 08a3672..ddedd1c 100644 --- a/result/diceresult.cpp +++ b/result/diceresult.cpp @@ -24,6 +24,7 @@ #include <QDebug> DiceResult::DiceResult() + : m_operator(Die::PLUS) { m_resultTypes= (DICE_LIST | SCALAR); m_homogeneous = true; |