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: mbed 4DGL-uLCD-SE PinDetect
Diff: diceMath.h
- Revision:
- 0:8ef203a5084f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/diceMath.h Thu Mar 17 17:50:51 2022 +0000
@@ -0,0 +1,35 @@
+//This file contains all the function prototypes for diceMath.cpp
+#ifndef DICEMATH_H
+#define DICEMATH_H
+
+class Dice{
+ public:
+ Dice(); //Constructor
+
+ //Function prototypes
+ void accelerometer();
+ void startDiceRoll();
+ void rollDice(int[]);
+ int rollDie();
+ void displayStartScreen(int);
+ void displayDiceOutline(int currPos);
+ void displayDiceNumber(int currPos, int currValue);
+
+ //Setters and Getters
+ void setTakeaway(int);
+ void setSetTakeaway(int input);
+ int getTakeaway();
+ void setNumOfDice();
+ int getNumOfDice();
+ void setNumberOfDice(int);
+ int getDiceResult(int[], int);
+ int getGetDiceResults(int);
+ void setDiceResult (int[], int position, int value);
+ void setSetDiceResult (int position, int value);
+
+ private:
+ int numberOfDice;
+ int diceResults[7];
+ int takeaway;
+}; //end of class
+#endif
\ No newline at end of file