blob: 8b6e66aa74ac13cdf85c45df64032ec7251f9bf6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
|