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

Dependencies:   microbit

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Sprite.h Source File

Sprite.h

00001 #ifndef SPRITE_H
00002 #define SPRITE_H
00003 
00004 class Sprite{
00005     protected:
00006     int m_x;
00007     int m_y;
00008     
00009     public:
00010     Sprite();
00011     Sprite(int x, int y);
00012     int getX();
00013     int getY();
00014     void setX(int x);
00015     void setY(int y);
00016     bool hitBy(Sprite another);
00017 };
00018 
00019 #endif