I am learning OOP using c++ on a MicroBit by developing this simple game

Dependencies:   microbit

Committer:
ahmeou
Date:
Thu Jul 09 06:04:17 2020 +0000
Revision:
3:a21366e3261e
Parent:
1:25f13b341b11

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ahmeou 1:25f13b341b11 1 #ifndef SPRITE_H
ahmeou 1:25f13b341b11 2 #define SPRITE_H
ahmeou 0:17bdfb0e7069 3
ahmeou 0:17bdfb0e7069 4 class Sprite{
ahmeou 3:a21366e3261e 5 protected:
ahmeou 0:17bdfb0e7069 6 int m_x;
ahmeou 0:17bdfb0e7069 7 int m_y;
ahmeou 0:17bdfb0e7069 8
ahmeou 0:17bdfb0e7069 9 public:
ahmeou 0:17bdfb0e7069 10 Sprite();
ahmeou 0:17bdfb0e7069 11 Sprite(int x, int y);
ahmeou 0:17bdfb0e7069 12 int getX();
ahmeou 0:17bdfb0e7069 13 int getY();
ahmeou 0:17bdfb0e7069 14 void setX(int x);
ahmeou 0:17bdfb0e7069 15 void setY(int y);
ahmeou 0:17bdfb0e7069 16 bool hitBy(Sprite another);
ahmeou 0:17bdfb0e7069 17 };
ahmeou 0:17bdfb0e7069 18
ahmeou 0:17bdfb0e7069 19 #endif