ELEC2645 (2018/19) / Mbed 2 deprecated el17ajf

Dependencies:   mbed

Fork of el17ajf by Angus Findlay

Revision:
19:370d83a8dc33
Child:
20:cd96f98f5f79
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Prefs/Prefs.h	Wed Apr 03 16:18:26 2019 +0000
@@ -0,0 +1,24 @@
+#ifndef PREFS_H
+#define PREFS_H
+
+#include "mbed.h"
+#include "SDFileSystem.h"
+
+class Prefs {
+public:
+    enum Key {
+        HIGHSCORE1, HIGHSCORE2, HIGHSCORE3,
+        HIGHSCORE1_PLAYER, HIGHSCORE2_PLAYER, HIGHSCORE3_PLAYER,
+        LAST_PLAYER
+    };
+    Prefs();
+    ~Prefs();
+    void setKey(Key key, int value);
+    int getKey(Key key);
+    void resetAll();
+private:
+    SDFileSystem * sd;
+    FILE * file; 
+};
+
+#endif
\ No newline at end of file