Snake vs Block Game to be run upon K64F.

Dependencies:   mbed

Revision:
33:249cf423fb18
Parent:
30:461231877c89
Child:
34:89f53ffc81bb
diff -r 3a3bdeffdf62 -r 249cf423fb18 StartScreen/StartScreen.h
--- a/StartScreen/StartScreen.h	Mon Apr 15 13:58:09 2019 +0000
+++ b/StartScreen/StartScreen.h	Wed Apr 17 07:47:06 2019 +0000
@@ -5,6 +5,8 @@
 #include "N5110.h"
 #include "Gamepad.h"
 #include "Settings.h"
+#include "Stats.h"
+#include "SDFileSystem.h"
 
 class StartScreen
 {
@@ -13,57 +15,55 @@
     StartScreen();
     ~StartScreen()
     ;
-    void init();
     
     /** Initialise StartScreen
     *
     *   This function initialises the Game Interface and restarts the display.
     */
-    void screen_saver(N5110 &lcd, Gamepad &pad);
+    void init();
     
     /** Draw
     *
     *   This function draws the Sprite onto the screen.
     */
-    void instruct(N5110 &lcd, Gamepad &pad);
+    void screen_saver(N5110 &lcd, Gamepad &pad);
     
     /** Instruct
     *
     *   This function updates the user about how to progress after the game banner has been displayed..
     */
-    void info(N5110 &lcd, Gamepad &pad);
+    void instruct(N5110 &lcd, Gamepad &pad);
     
     /** Display userID
     *
     *   This function shows who the author of the game is before showing the menu screen.
     */
-    void menu_screen1(N5110 &lcd, Gamepad &pad);
+    void info(N5110 &lcd, Gamepad &pad);
     
     /** The First Menu Screen
     *
     *   This function obtains the user input on how they want to progress.
     */
-    
-    void DisplaySc1Contents(N5110 &lcd, Gamepad &pad);
+    void main_menu(N5110 &lcd, Gamepad &pad, SDFileSystem &sd);
     
     /** Displaying The First Menu Screen
     *
     *   This function just displays Menu Screen 1 contents.
     */
-    
-    void menu_screen2(N5110 &lcd, Gamepad &pad);
-    
+    void DisplaySc1Contents(N5110 &lcd, Gamepad &pad);
+
     /** The Second Menu Screen
     *
     *   This function obtains the user input on the game type they would like to play.
     */
-    
-    void menu_screen3(N5110 &lcd, Gamepad &pad);
+    void game_mode(N5110 &lcd, Gamepad &pad, SDFileSystem &sd);
     
     /** The Third Menu Screen
     *
     *   This function obtains the user input on the game speed that suits them.
     */
+    void game_speed(N5110 &lcd, Gamepad &pad, SDFileSystem &sd);
+    
     
     int fps; // this sends over the game speed
     int i;
@@ -72,6 +72,10 @@
     int st;
     int sc;  
     float cs;
+    
+    private:
+    int _level;
+    Stats _stats;