summaryrefslogtreecommitdiffstats
path: root/kue/localplayer.h
blob: fa30762556c64931d808b4a1ac4df76cb8cdd10e (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
35
36
37
38
39
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