2036 mbed lab4
Dependencies: 4DGL-uLCD-SE PinDetect
Die.h
00001 #define WHITE 0xFFFFFF 00002 #include "mbed.h" 00003 00004 enum DieState{ROLL,REMOVED};//dice class, members are positions, colors, value of dice, and a state 00005 class Die{ 00006 public: 00007 Die(int x11=0, int y11=0, int x12=0, int y12=0, int col=WHITE, int val=0){ 00008 x1=x11; 00009 x2=x12; 00010 y1=y11; 00011 y2=y12; 00012 Color=col; 00013 value=val; 00014 currDieState=ROLL; 00015 }; 00016 void rollDie(); 00017 void drawDie();//functions for rolling, drawing, and setting and getting data members 00018 void setCurrDieState(DieState v); 00019 DieState getCurrDieState(); 00020 int getx1(); 00021 int getx2(); 00022 int gety1(); 00023 int gety2(); 00024 int getColor(); 00025 int getValue(); 00026 00027 00028 private: 00029 int x1; 00030 int x2; 00031 int y1; 00032 int y2; 00033 int Color; 00034 int value; 00035 DieState currDieState; 00036 00037 00038 };
Generated on Sat Oct 29 2022 15:46:27 by 1.7.2