Advertisement
Guest User

Player.h

a guest
Feb 25th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #pragma once
  2.  
  3. class CPlayer {
  4. public:
  5. CPlayer();
  6. CPlayer(char *);
  7. CPlayer(unsigned, unsigned, bool, char*);
  8. CPlayer(bool, char*);
  9. CPlayer(const CPlayer &);
  10. //ivan=joe
  11. //ivan.operator=(joe)
  12. //predefinirane na operator
  13. //const zashtoto e podaden po referenciq i ne trqbva da se promenqt dannite na osnovniq
  14. CPlayer&operator=(const CPlayer &); //funkciqta e mutator, zashtoto za vseki obekt shte se suzdavat
  15. ~CPlayer();
  16.  
  17. int setScore(unsigned);
  18. int setLives(unsigned);
  19. int setState(bool);
  20. int setNick(char *);
  21.  
  22. unsigned getScore() const;
  23. unsigned getLives() const;
  24. bool getState() const;
  25. char * getNick() const;
  26.  
  27. private:
  28. unsigned score;
  29. unsigned lives;
  30. bool state;
  31. char * nick;
  32. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement