#define MAXBULLETS 30


class Ship{
		friend Bullet &bullet(Ship &s, int i);
	private:
		Vector nose;
		Vector center;
		double theta;
		Vector velocity;
		Vector leftwing;
		Vector rightwing;
		int bullets;
		Bullet bullet[MAXBULLETS];
		bool alive;
	public:
		Ship(const Vector &n=CENTER, double d=(3*Pi/2), const Vector &v=Vector(0,0),
			bool a=true);
		Ship(const Ship &copy);
		~Ship();
		void draw(byte_t color, byte_t bulletcolor, byte_t *where);
		void set(const Vector &n=CENTER, double d=(3*Pi/2), const Vector &v=Vector(0,0));
		void jump(const Vector &n);
		void attitude(double d);
		void left();
		void right();
		void turn(double t);
		void push(int ticks);
		void slideUp(int ticks);
		void slideDown(int ticks);
		void slideRight(int ticks);
		void slideLeft(int ticks);
		void fly(int ticks);
		void shoot(int i=0);
		void shoot(double angle);
		int shots();
		bool collide(Circle c);
		void kill();
		void live();
		bool dead();
		long score;
		Vector getCenter();
};
