coding for player typing game:
1.
class Player
{
public:
Sprite shape;
Texture*texture;
int HP;
int HPMax;
std:: vector<Bullet> bullets;
Player (Texture*texture ) //constructor of class Player
{
this ->HPMax = 10;
this->HP =this ->HPMax;
this -> texture= texture;
this ->[Link](*texture);
this->[Link](0.1f,0.1f);
}
~ Player(){} //Destructor of class Player
2.
Texture playerTex;
[Link]("[Link]"); //player image
3.
Player player (&playerTex); //loading the image of the spaceship / player image