Snake vs Block Game to be run upon K64F.

Dependencies:   mbed

MenuClasses/Stats/Stats.h

Committer:
AhmedPlaymaker
Date:
2019-05-06
Revision:
84:9950d561fdf8
Parent:
83:329da564799a
Child:
90:741120c09784

File content as of revision 84:9950d561fdf8:

#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