Ahmed Adamjee
/
SnakeVSBlock
Snake vs Block Game to be run upon K64F.
Diff: Stats/Stats.h
- Revision:
- 33:249cf423fb18
diff -r 3a3bdeffdf62 -r 249cf423fb18 Stats/Stats.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Stats/Stats.h Wed Apr 17 07:47:06 2019 +0000 @@ -0,0 +1,54 @@ +#ifndef Stats_H +#define Stats_H + +#include "mbed.h" +#include "N5110.h" +#include "Gamepad.h" +#include "SDFileSystem.h" + +class Stats +{ + public: + + Stats(); + ~Stats(); + + /** Stats Display + * + * This function is used to configure stats. + */ + + void StatsDisplay(N5110 &lcd, Gamepad &pad, SDFileSystem &sd); + + /** 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; + + +}; +#endif \ No newline at end of file