Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: 4DGL-uLCD-SE PinDetect mbed
gobbleBuzz.h
- Committer:
- gboudreau6
- Date:
- 2022-11-22
- Revision:
- 0:56c7173428ac
File content as of revision 0:56c7173428ac:
#ifndef GOBBLE_BUZZ_H #define GOBBLE_BUZZ //I am okay with keeping these //as define statements for the colors #define WHITE 0xFFFFFF #define BLACK 0x000000 #define RED 0xFF0000 #define GREEN 0x00FF00 #define BLUE 0x0000FF #define LGREY 0xBFBFBF #define DGREY 0x5F5F5F #define YELLOW 0xFFFF00 #define BROWN 0x964B00 //Maybe these should be c++ constants //defined in your GobbleBuzz class!! #define X_DELTA 5 #define Y_DELTA 5 class GobbleBuzz { public: GobbleBuzz(): xpos(50), ypos(50) { copyX();copyY();} inline void copyX(){ xOLDpos = xpos;} inline void copyY() {yOLDpos = ypos;} inline void increaseX() { xpos+=X_DELTA ;} inline void increaseY() { ypos+=Y_DELTA;} inline void decreaseX() { xpos-=X_DELTA; } inline void decreaseY() { ypos-=Y_DELTA; } bool overlap(int,int,int,int); int getXPos() const { return xpos; } int getYPos() const { return ypos; } int getOLDXPos() const { return xOLDpos; } int getOLDYPos() const {return yOLDpos; } private: int xpos; int ypos; int xOLDpos; int yOLDpos; }; #endif