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/localplayer.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/localplayer.h')
-rw-r--r-- | kue/localplayer.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/kue/localplayer.h b/kue/localplayer.h new file mode 100644 index 00000000..fa307625 --- /dev/null +++ b/kue/localplayer.h @@ -0,0 +1,40 @@ +#ifndef _LOCALPLAYER_H +#define _LOCALPLAYER_H + +#include <tqstring.h> +#include <tqcolor.h> + +#include "player.h" +#include "interface.h" +#include "main.h" + + +class KueLocalPlayer : public KuePlayer { + TQ_OBJECT + public: + KueLocalPlayer(TQString name = TQString::null, TQColor = TQt::white); + ~KueLocalPlayer() {} + + // Rules' functions + void placeBilliard(int index, const KueBilliard &b, double line, TQObject *dest = 0, const char *slot = 0); + void takeShot(int billiard, bool forward_only = false, TQObject *dest = 0, const char *slot = 0); + + protected slots: + // Called by the interface when the user has decided on a cue location + void billiardPlaced(point &location); + // Called by the interface when the user is deciding on a cue location + void previewBilliardPlace(point &location); + void shotTaken(vector &velocity); + + protected: + void callBack(); + + TQObject *_dest; + const char *_dest_slot; + TQColor _color; + + double _radius; + int _index; +}; + +#endif |