summaryrefslogtreecommitdiffstats
path: root/kue/modules/freeplay/freeplay.h
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2024-08-07 19:13:02 +0300
committerMavridis Philippe <mavridisf@gmail.com>2024-08-07 19:23:24 +0300
commit04b5a62b8d9f5ff8240f25361046f2a5d58e8262 (patch)
tree98b126454cdf68d544e138d7e8b31d5fd45b72c2 /kue/modules/freeplay/freeplay.h
parent83ba00b7e569587d50383ff06a70148042ca780e (diff)
downloadtdegames-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/modules/freeplay/freeplay.h')
-rw-r--r--kue/modules/freeplay/freeplay.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/kue/modules/freeplay/freeplay.h b/kue/modules/freeplay/freeplay.h
new file mode 100644
index 00000000..f51ba950
--- /dev/null
+++ b/kue/modules/freeplay/freeplay.h
@@ -0,0 +1,46 @@
+#ifndef _FREEPLAY_H
+#define _FREEPLAY_H
+
+#include <tqobject.h>
+#include <klibloader.h>
+
+#include "vector.h"
+#include "point.h"
+#include "rules.h"
+
+
+// Forward declarations of our helper classes
+class TQString;
+
+// Possible values of _game_called
+enum gameCallType {GAME_UNCALLED, GAME_PLAYER1_STRIPES, GAME_PLAYER1_SOLIDS};
+
+
+class FreePlayFactory : KLibFactory {
+ public:
+ TQObject* createObject(TQObject*, const char*, const char*, const TQStringList &);
+};
+
+class FreePlay : public KueRulesEngine {
+ TQ_OBJECT
+ public:
+ FreePlay(TQObject *parent, const char *name);
+ ~FreePlay();
+
+ void start();
+
+ protected slots:
+ // Called by the physics engine when all billiards have stopped moving
+ void motionStopped();
+ // Called by the interface after the user has decided on a shot
+ void shotTaken();
+
+ private:
+ // Ask the interface to start the shot
+ void startShot();
+
+ unsigned int _current_team;
+};
+
+
+#endif