diff options
| author | 2022-04-29 10:48:09 +0200 | |
|---|---|---|
| committer | 2022-04-29 10:48:09 +0200 | |
| commit | 07c5f6ec23fcf9237a24e71adcfacabce677f818 (patch) | |
| tree | 588e8c5f82b9163181fad3581f610e6f1d88cba4 /src/tests/dice/testnode.h | |
| parent | a9153f1615a842cfb9e9bcda4d9071e202618569 (diff) | |
| download | OneRoll-07c5f6ec23fcf9237a24e71adcfacabce677f818.tar.gz OneRoll-07c5f6ec23fcf9237a24e71adcfacabce677f818.zip | |
Change file organization.
Diffstat (limited to 'src/tests/dice/testnode.h')
| -rw-r--r-- | src/tests/dice/testnode.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/tests/dice/testnode.h b/src/tests/dice/testnode.h new file mode 100644 index 0000000..5c918ee --- /dev/null +++ b/src/tests/dice/testnode.h @@ -0,0 +1,44 @@ +#ifndef TESTNODE_H +#define TESTNODE_H + +#include <Qt> + +#include "executionnode.h" +#include "result/diceresult.h" +#include <utility> +/** + * @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 |