Kevin Lin / Mbed 2 deprecated Lab4Farkle

Dependencies:   mbed 4DGL-uLCD-SE PinDetect

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers farklegame.h Source File

farklegame.h

00001 /**
00002 Author: Kevin Lin
00003 Title: Lab 4
00004 Date: October 22 2021
00005 Description: Header file of a FarkleGameObject
00006  
00007 **/
00008 
00009 #ifndef FARKLEGAME_H
00010 #define FARKLEGAME_H
00011 #include "die.h"
00012 #include "Speaker.h"
00013 #include "MMA8452.h"
00014 #include "uLCD_4DGL.h"
00015 
00016 class FarkleGame {
00017     private:
00018         Die diceArray[6];
00019         int diceValueArray[6];
00020         int turnScore;
00021         int farkleCount;
00022         int rollScore;
00023     public:
00024         FarkleGame();
00025         void rollDice(Speaker&);
00026         int calculateRoll();
00027         void changeScore();
00028         
00029         int getDiceValue(int index);
00030         void setDiceValue(int index, int value);
00031         
00032         void restart();
00033         void loadVals(int nd);
00034         
00035         void displayIntro(uLCD_4DGL&, int);
00036         void displayFarkle(uLCD_4DGL& screen);
00037         void displayScore(uLCD_4DGL& screen);
00038         void displayTurnScore(uLCD_4DGL&);
00039         void displayDice(uLCD_4DGL&, int);
00040         
00041         bool enoughGravity(MMA8452&);
00042         
00043         
00044 };
00045 
00046 #endif