aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node/occurencecountnode.h
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2019-07-10 11:55:14 +0200
committerRenaud G <renaud@rolisteam.org>2019-07-12 22:06:40 +0200
commit80bc5ef3c8276a33d0c3b1cb962939e7c252ae7c (patch)
tree4d3fc68fbbcbed39b5c5007ffc065979d09318ed /node/occurencecountnode.h
parent0351038352f4f22f5a114abe875fb58d55183a86 (diff)
downloadOneRoll-80bc5ef3c8276a33d0c3b1cb962939e7c252ae7c.tar.gz
OneRoll-80bc5ef3c8276a33d0c3b1cb962939e7c252ae7c.zip
Change behaviour of occurence count node.
Now it can generate a dice result.
Diffstat (limited to 'node/occurencecountnode.h')
-rw-r--r--node/occurencecountnode.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/node/occurencecountnode.h b/node/occurencecountnode.h
index 125f340..492b295 100644
--- a/node/occurencecountnode.h
+++ b/node/occurencecountnode.h
@@ -24,6 +24,7 @@
#include "validator.h"
class StringResult;
+class DiceResult;
class OccurenceCountNode : public ExecutionNode
{
public:
@@ -45,10 +46,15 @@ public:
void setValidator(Validator* validator);
private:
+ void runForStringResult(const std::map<qint64, qint64>& mapOccurence, QVector<qint64>& vec);
+ void runForDiceResult(const std::map<qint64, qint64>& mapOccurence);
+
+private:
qint64 m_width= 1;
qint64 m_height= 0;
Validator* m_validator= nullptr;
StringResult* m_stringResult= nullptr;
+ DiceResult* m_diceResult= nullptr;
};
#endif // OCCURENCECOUNTNODE_H