I am learning OOP using c++ on a MicroBit by developing this simple game
Diff: gameEngine/inc/game.h
- Revision:
- 0:17bdfb0e7069
diff -r 000000000000 -r 17bdfb0e7069 gameEngine/inc/game.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gameEngine/inc/game.h Wed Jul 08 16:35:55 2020 +0000 @@ -0,0 +1,22 @@ +#ifndef GAME_H +#define GAME_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); +}; + +#include "Bullet.h" +#include "Spacecraft.h" + +#endif \ No newline at end of file