1 #ifndef _curling_h
2 #define _curling_h
3 
4 #ifndef _vec2_h
5 #	include "vec2.h"
6 #endif
7 #ifndef _game_h
8 #	include "game.h"
9 #endif
10 
11 #define	TEAMS		2
12 #define	CURLS		4
13 
14 class BallMover;		// forward
15 class Goal;
16 class StaticBall;
17 class Wall;
18 
19 class Curling : public Game {
20 	public:
21 		static Real	TableWidth;
22 		static Real TableHeight;
23 
24 		Curling(double wx=TableWidth, double wy=TableHeight);
25 		virtual ~Curling();
26 
27 		virtual const Real & GetPresetA() const;
28 		virtual const Real & GetPresetHaft() const;
29 		virtual const Real & GetSlowGranularity() const;
30 
31 		virtual const Real & GetNormalBallSize() const;
32 
33 		virtual const Real AreaOffX() const;
34 		virtual const Real AreaOffY() const;
35 		virtual const Real AreaWidth() const;
36 		virtual const Real AreaHeight() const;
37 
38 		virtual void InitPlayground();
39 		virtual void DrawBackground() const;
40 		virtual void ResetGame();
41 
42 		void InitArea( double wx, double wy );
43 		void InitTable();
44 
45 		static Real PresetA;
46 		static Real PresetHaft;
47 		static Real SlowGranularity;
48 
49 		static Real FrameOffset;
50 		static Real GoalSize;
51 
52 		static Real Offset;
53 		static Real CurlRadius;
54 		static Real CurlWeight;
55 
56 		static Real	KeeperFrame;
57 		static Real KeeperHeight;
58 
59 	protected:
60 		Real area_off_x;
61 		Real area_off_y;
62 		Real area_width;
63 		Real area_height;
64 
65 		BallMover	*mcurl;
66 
67 		ColorId		table_col;
68 		ColorId		black_bg_col;
69 		ColorId		red_bg_col;
70 		ColorId		blue_bg_col;
71 
72 		ColorId		table_dark_col;
73 		ColorId		curl_col[TEAMS];
74 
75 	protected:
76 		Vec2		mid;
77 		Vec2		edge[4];
78 		Goal		*goal;
79 		Wall		*w[3];
80 
81 		Ball		*curl[TEAMS][CURLS];
82 		Vec2		curl_p[TEAMS][CURLS];
83 
84 	private:
Curling(const Curling &)85 		Curling( const Curling& /*obj*/)						{}
86 		Curling &operator=( const Curling& /*obj*/ )		{ return *this; }
87 };
88 
89 #endif
90