Farkle Game Code-Final
Dependencies: mbed 4DGL-uLCD-SE PinDetect
farkleMath.h
00001 //Function prototypes for calculating the different score values of the game 00002 #ifndef FARKLEMATH_H 00003 #define FARKLEMATH_H 00004 00005 class FarkleMath{ 00006 public: 00007 FarkleMath(); //Constructor 00008 00009 //Function prototypes for all possible scoring Dice 00010 void five(bool& value); 00011 void one(bool& value); 00012 void twofive(bool& value); 00013 void twoone(bool& value); 00014 void threeOne(bool& value); 00015 void threeTwo(bool& value); 00016 void threeThree(bool& value); 00017 void threeFour(bool& value); 00018 void threeFive(bool& value); 00019 void threeSix(bool& value); 00020 void flush(bool& value); 00021 void threePairs(bool& value); 00022 void twoTriplets(bool& value); 00023 void fourOfAKind(bool& value); 00024 void fiveOfAKind(bool& value); 00025 void sixOfAKind(bool& value); 00026 void isZero(bool& value); 00027 00028 //Printing Score, Farkle, or "End Game" 00029 void printRollScore(bool& value); 00030 void printTurnScore(bool& value); 00031 void printFarkle(bool& value); 00032 void printEndGame(int); 00033 00034 //Setters and Getters 00035 void setRollScore(int input); 00036 void setTurnScore(int input); 00037 int getRollScore(); 00038 int getTurnScore(); 00039 00040 //Calculates the Score 00041 void calculateScore(); 00042 00043 private: 00044 //Variables 00045 int turnScore; 00046 int rollScore; 00047 bool temp; 00048 }; //end of class 00049 #endif
Generated on Mon Aug 8 2022 08:07:50 by
1.7.2