diff options
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 |