![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
2036 mbed lab4
Dependencies: 4DGL-uLCD-SE PinDetect
Die.h
- Committer:
- lhanks02
- Date:
- 2022-03-28
- Revision:
- 0:bbda88bee65a
File content as of revision 0:bbda88bee65a:
#define WHITE 0xFFFFFF #include "mbed.h" enum DieState{ROLL,REMOVED};//dice class, members are positions, colors, value of dice, and a state class Die{ public: Die(int x11=0, int y11=0, int x12=0, int y12=0, int col=WHITE, int val=0){ x1=x11; x2=x12; y1=y11; y2=y12; Color=col; value=val; currDieState=ROLL; }; void rollDie(); void drawDie();//functions for rolling, drawing, and setting and getting data members void setCurrDieState(DieState v); DieState getCurrDieState(); int getx1(); int getx2(); int gety1(); int gety2(); int getColor(); int getValue(); private: int x1; int x2; int y1; int y2; int Color; int value; DieState currDieState; };