summaryrefslogtreecommitdiffstats
path: root/kue/modules/freeplay/freeplay.h
blob: f51ba950c8a012dc77e8db36d23f109976c8a7ad (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
41
42
43
44
45
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