Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef RUNNER_H
- #define RUNNER_H
- // Runner.h
- class Runner{
- public:
- Runner();
- int getPosition();
- virtual int updatePosition() = 0;
- void collide();
- char getAvatar();
- int getEnergyLevel();
- bool isDown();
- void eatSnack();
- const static int MAX_ENERGY = 25;
- private:
- int currentPosition;
- char avatar;
- int energyLevel;
- bool down;
- void setEnergyLevel(int);
- bool setPosition(int);
- };
- #endif
- #ifndef TORTOISE_H
- #define TORTOISE_H
- #include "Runner.h"
- class Tortoise : public Runner {
- public:
- Tortoise();
- virtual voide updatePositon();
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement