So, now that we have a player ship that is shooting, we can work on adding an enemy ship. It will be similar to the PlayerShip class. Later, we will get into class inheritance so that we will not end up with a copied and pasted version of the same code, but for right now we will add a new class definition to our game.hpp file that is almost identical to our PlayerShip class:
enum FSM_STUB {
SHOOT = 0,
TURN_LEFT = 1,
TURN_RIGHT = 2,
ACCELERATE = 3,
DECELERATE = 4
};
class EnemyShip {
public:
const char* c_SpriteFile = "sprites/BirdOfAnger.png";
const Uint32 c_MinLaunchTime = 300;
const int c_Width = 16;
const int c_Height = 16;
const int c_AIStateTime = 2000;
Uint32 m_LastLaunchTime;
SDL_Texture *m_SpriteTexture;
FSM_STUB m_AIState;
int m_AIStateTTL;
float m_X;
...