diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2024-08-07 19:13:02 +0300 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2024-08-07 19:23:24 +0300 |
commit | 04b5a62b8d9f5ff8240f25361046f2a5d58e8262 (patch) | |
tree | 98b126454cdf68d544e138d7e8b31d5fd45b72c2 /kue/rules.h | |
parent | 83ba00b7e569587d50383ff06a70148042ca780e (diff) | |
download | tdegames-feat/kue.tar.gz tdegames-feat/kue.zip |
Add Kue billiards gamefeat/kue
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'kue/rules.h')
-rw-r--r-- | kue/rules.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/kue/rules.h b/kue/rules.h new file mode 100644 index 00000000..8b6e66aa --- /dev/null +++ b/kue/rules.h @@ -0,0 +1,34 @@ +#ifndef _RULES_H +#define _RULES_H + +#include <tqobject.h> + +#include "vector.h" +#include "point.h" +#include "rules.h" + +// Temple for rules engine plugins +class KueRulesEngine : public TQObject { + TQ_OBJECT + public: + KueRulesEngine(TQObject *parent = 0, const char *name = 0) : TQObject(parent, name) {} + virtual ~KueRulesEngine() {} + + virtual void start() = 0; + + signals: + // Emitting gameOver notifies the user of the result, stops the physics + // engine, and schedules us for deletion + void gameOver(const TQString &result); + void showMessage(const TQString &text); + + protected slots: + // Called by physics engine when a billiard is sunk + virtual void billiardSunk(unsigned int ball, unsigned int pocket); + // Called by physics engine when a billiard is struck (by the cue ball or another billiard) + virtual void billiardHit(unsigned int ball1, unsigned int ball2); + // Called by the physics engine when all billiards have stopped moving + virtual void motionStopped(); +}; + +#endif |