From 6f499de159eeac37fe473f945042e13359dc2d40 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Thu, 25 Jul 2019 09:59:03 +0200 Subject: move files --- tests/dice/testnode.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 tests/dice/testnode.h (limited to 'tests/dice/testnode.h') diff --git a/tests/dice/testnode.h b/tests/dice/testnode.h new file mode 100644 index 0000000..5c918ee --- /dev/null +++ b/tests/dice/testnode.h @@ -0,0 +1,44 @@ +#ifndef TESTNODE_H +#define TESTNODE_H + +#include + +#include "executionnode.h" +#include "result/diceresult.h" +#include +/** + * @brief The TestNode class replaces any kind of node for test purpose. + */ +class TestNode : public ExecutionNode +{ +public: + /** + * @brief TestNode builds an instance + * @param faces, number of faces of dices + * @param offset, first value of dice. + */ + TestNode(); + virtual ~TestNode() override; + + /** + * @brief run - starts to roll dice. + */ + virtual void run(ExecutionNode*) override; + /** + * @brief toString + * @param wl + * @return use to generate dot tree; + */ + virtual QString toString(bool wl) const override; + /** + * @brief getPriority + * @return priority for dice roll: 4 (higher) + */ + virtual qint64 getPriority() const override; + + virtual ExecutionNode* getCopy() const override; + + void setResult(Result* result); +}; + +#endif // TESTNODE_H -- cgit v1.2.3-70-g09d2