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: FarkleGame.h
- Revision:
- 0:7d8ffdfdb16e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/FarkleGame.h Fri Oct 22 03:57:47 2021 +0000
@@ -0,0 +1,50 @@
+#ifndef FARKLEGAME_H
+#define FARKLEGAME_H
+
+#include "Die.h"
+#include "MMA8452.h"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+class FarkleGame{
+ public:
+ //Constructor
+ FarkleGame();
+
+ //Methods
+ void dispIntro(uLCD_4DGL&, int);
+ void init();
+
+ //rolling/scoring methods
+ void rollDice();
+ void displayDice(uLCD_4DGL&, int);
+ void loadVals(int);
+ int calcScore();
+ void updateScores();
+
+ //display methods
+ void dispFarkle(uLCD_4DGL&);
+ void dispScore(uLCD_4DGL&);
+ void dispTurn(uLCD_4DGL&);
+ void scrnWipe(uLCD_4DGL&);
+
+ //acc methods
+ bool checkRoll(MMA8452&);
+
+ //S&G
+ int getDieVal(int);
+ void setDieVal(int, int);
+
+ private:
+ Die Dice[6];
+ int DiceVals[6];
+
+ int turnScore;
+ int rollScore;
+ int farkles;
+};
+
+#endif
\ No newline at end of file