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
FarkleGame.h
- Committer:
- ashi31
- Date:
- 2021-10-22
- Revision:
- 0:7d8ffdfdb16e
File content as of revision 0:7d8ffdfdb16e:
#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