File: cannon.h

package info (click to toggle)
flying 6.20-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 712 kB
  • ctags: 1,882
  • sloc: cpp: 10,967; makefile: 243
file content (42 lines) | stat: -rw-r--r-- 684 bytes parent folder | download | duplicates (4)
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
#ifndef _cannon_h
#define _cannon_h

#ifndef _real_h
#	include "real.h"
#endif
#ifndef _billard_h
#	include "billard.h"
#endif

class Wall;
class Ball;

class Cannon : public Billard {
	public:
		static Real TableWidth;
		static Real TableHeight;
		static Real BallRadius;

	public:
		Cannon(double dx=TableWidth, double dy=TableHeight);
		virtual ~Cannon();

		virtual const Real &GetNormalBallSize() const;

		virtual void InitPlayground();
		virtual void DrawBackground() const;
		virtual void ResetGame();

	protected:
		ColorId	red_col;
		ColorId	white_col;
		ColorId	yellow_col;

	private:
		Ball *w1, *w2;
		Ball *r;

		Vec2	w1_p, w2_p, r_p;			// Starting-Positions
};

#endif