Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef PLAYER_H_INCLUDED
- #define PLAYER_H_INCLUDED
- using namespace std;
- class Player{
- public:
- // Variables
- string skin;
- string backpack;
- unsigned int health;
- unsigned int shield;
- // Constructors
- Player(){
- skin = "A.I.M.";
- backpack = "E.L.I.M.";
- health = 1;
- shield = 0;
- }
- Player(string skin){
- this->skin = skin;
- backpack = "E.L.I.M.";
- health = 1;
- shield = 0;
- }
- Player(string skin, string backpack){
- this->skin = skin;
- this->backpack = backpack;
- health = 1;
- shield = 0;
- }
- Player(string skin, string backpack, unsigned int health){
- this->skin = skin;
- this->backpack = backpack;
- this->health = health;
- shield = 0;
- }
- Player(string skin, string backpack, unsigned int health, unsigned int shield){
- this->skin = skin;
- this->backpack = backpack;
- this->health = health;
- this->shield = shield;
- }
- // Methods
- void displayPlayerStars(unsigned int n){
- for(unsigned int i=0; i<n; i++){
- cout << "*";
- }
- cout << endl;
- }
- void show(){
- displayPlayerStars(34);
- cout << "**** Your Player's info: ****\n";
- cout << "Skin: " << skin << endl << "Backpack: " << backpack << endl;
- cout << "Health: " << health << endl << "Shield: " << shield << endl;
- displayPlayerStars(34);
- }
- };
- #endif // PLAYER_H_INCLUDED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement