diff options
| author | 2018-10-23 20:01:40 +0200 | |
|---|---|---|
| committer | 2018-10-23 20:01:40 +0200 | |
| commit | eef188c6cc953fcff9cf4491b0ae8256608caa14 (patch) | |
| tree | 8f3cae083a36d7ea022f4840659b0334a625903e /diceparser.cpp | |
| parent | 4b3134b843d4e211f9c93ee01178d431b5dce79f (diff) | |
| download | OneRoll-eef188c6cc953fcff9cf4491b0ae8256608caa14.tar.gz OneRoll-eef188c6cc953fcff9cf4491b0ae8256608caa14.zip | |
first draft for diceresult
Diffstat (limited to 'diceparser.cpp')
| -rw-r--r-- | diceparser.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/diceparser.cpp b/diceparser.cpp index 41a91e5..0d41f4d 100644 --- a/diceparser.cpp +++ b/diceparser.cpp @@ -494,19 +494,23 @@ QStringList DiceParser::getAllDiceResult(bool& hasAlias) } void DiceParser::getLastDiceResult(QList<ExportedDiceResult>& diceValuesList,bool& homogeneous) { + int i = 0; for(auto start : m_startNodes) { ExportedDiceResult diceValues; ExecutionNode* next = getLeafNode(start); Result* result=next->getResult(); - + qDebug() << "tour:"<<i++; while(nullptr!=result) { + qDebug()<< "result is not null"<<i; if(result->hasResultOfType(Result::DICE_LIST)) { + qDebug() << "has diceresult"<<i; DiceResult* diceResult = dynamic_cast<DiceResult*>(result); if(nullptr!=diceResult) { + qDebug() << "cast diceresult"; if(homogeneous) { @@ -516,8 +520,9 @@ void DiceParser::getLastDiceResult(QList<ExportedDiceResult>& diceValuesList,boo ListDiceResult listpair; for(Die* die : diceResult->getResultList()) { - if(!die->hasBeenDisplayed()) + // if(!die->hasBeenDisplayed()) { + qDebug() << "dice has NOT been displayed"; QList<qint64> valuesResult; valuesResult.append(die->getValue()); die->displayed(); @@ -533,9 +538,14 @@ void DiceParser::getLastDiceResult(QList<ExportedDiceResult>& diceValuesList,boo //QPair<QList<quint64>,bool> pair(valuesResult,die->isHighlighted()); listpair.append(hlDice); } + // else + { + qDebug() << "dice has been displayed"; + } } if(!listpair.isEmpty()) { + qDebug() << "list pair not empty "; if(!diceValues.contains(face)) { diceValues.insert(face,listpair); |