Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #ifndef RUNNER_H
  2. #define RUNNER_H
  3. // Runner.h
  4.  
  5. class Runner{
  6.  
  7. public:
  8. Runner();
  9. int getPosition();
  10. virtual int updatePosition() = 0;
  11. void collide();
  12. char getAvatar();
  13. int getEnergyLevel();
  14. bool isDown();
  15. void eatSnack();
  16. const static int MAX_ENERGY = 25;
  17.  
  18. private:
  19. int currentPosition;
  20. char avatar;
  21. int energyLevel;
  22. bool down;
  23. void setEnergyLevel(int);
  24. bool setPosition(int);
  25.  
  26. };
  27. #endif
  28.  
  29.  
  30. #ifndef TORTOISE_H
  31. #define TORTOISE_H
  32.  
  33. #include "Runner.h"
  34.  
  35.  
  36. class Tortoise : public Runner {
  37. public:
  38. Tortoise();
  39. virtual voide updatePositon();
  40. };
  41. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement