Andrew Shi / Mbed 2 deprecated Lab4

Dependencies:   mbed 4DGL-uLCD-SE PinDetect

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers FarkleGame.h Source File

FarkleGame.h

00001 #ifndef FARKLEGAME_H
00002 #define FARKLEGAME_H
00003 
00004 #include "Die.h"
00005 #include "MMA8452.h"
00006 
00007 #include <iostream>
00008 #include <string>
00009 
00010 using namespace std;
00011 
00012 class FarkleGame{
00013     public:
00014         //Constructor
00015         FarkleGame();
00016         
00017         //Methods
00018         void dispIntro(uLCD_4DGL&, int);
00019         void init();
00020         
00021         //rolling/scoring methods
00022         void rollDice();
00023         void displayDice(uLCD_4DGL&, int);
00024         void loadVals(int);
00025         int calcScore();
00026         void updateScores();
00027         
00028         //display methods
00029         void dispFarkle(uLCD_4DGL&);
00030         void dispScore(uLCD_4DGL&);
00031         void dispTurn(uLCD_4DGL&);
00032         void scrnWipe(uLCD_4DGL&);
00033 
00034         //acc methods
00035         bool checkRoll(MMA8452&);
00036         
00037         //S&G
00038         int getDieVal(int);
00039         void setDieVal(int, int);
00040         
00041     private:
00042         Die Dice[6];
00043         int DiceVals[6];
00044         
00045         int turnScore;
00046         int rollScore;
00047         int farkles;
00048 };
00049 
00050 #endif