I am learning OOP using c++ on a MicroBit by developing this simple game
Diff: gameEngine/inc/Sprite.h
- Revision:
- 1:25f13b341b11
- Parent:
- 0:17bdfb0e7069
- Child:
- 3:a21366e3261e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gameEngine/inc/Sprite.h Wed Jul 08 17:22:58 2020 +0000 @@ -0,0 +1,19 @@ +#ifndef SPRITE_H +#define SPRITE_H + +class Sprite{ + private: + int m_x; + int m_y; + + public: + Sprite(); + Sprite(int x, int y); + int getX(); + int getY(); + void setX(int x); + void setY(int y); + bool hitBy(Sprite another); +}; + +#endif \ No newline at end of file