I am learning OOP using c++ on a MicroBit by developing this simple game
Diff: gameEngine/inc/Asteroid.h
- Revision:
- 3:a21366e3261e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gameEngine/inc/Asteroid.h Thu Jul 09 06:04:17 2020 +0000 @@ -0,0 +1,8 @@ +#include "Sprite.h" + +class Asteroid: public Sprite{ + public: + void move(){ + m_y = (m_y + 1) % 5; + } +}; \ No newline at end of file