Snake vs Block Game to be run upon K64F.

Dependencies:   mbed

MenuClasses/Stats/Stats.h

Committer:
AhmedPlaymaker
Date:
2019-05-06
Revision:
83:329da564799a
Parent:
49:441c32f6603e
Child:
84:9950d561fdf8

File content as of revision 83:329da564799a:

#ifndef Stats_H
#define Stats_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "SDFileSystem.h"

class Stats
{
    public:
    
    Stats();
    ~Stats();
    
    /** Initialise Stats
    *
    *   This function passes the pointers to the stats class so that it can control the screen and the gamepad.
    */
    void init(N5110 *lcd, Gamepad *pad);
    
    /** Stats Display
    *
    *   This function is used to configure stats.
    */
    void StatsDisplay();
    
    /** write
    *
    *   This function is used to write to the file
    */
    void write(int level, SDFileSystem &sd);
    
    /** Read
    *
    *   This function is used to read from the file
    */
    void read(SDFileSystem &sd);
    
    /** delete file
    *
    *   This function allows us to delete the file
    */
    void delete_file(char filename[]);
    
    
    char bufferlevel[14];  //this helps me print the highest level on screen.
    
    private:
    int _stored_top_level;
    int _current_level;
    int _top_level;
    
    //Pointer to the game pad object pad.
    Gamepad *_pad;
    //Pointer to the N5110 object lcd.
    N5110 *_lcd;
    

};
#endif