Snake vs Block Game to be run upon K64F.

Dependencies:   mbed

Revision:
83:329da564799a
Parent:
80:51ca38c5dcdf
Child:
85:d50ba0994676
--- a/MenuClasses/Tutorial/Tutorial.h	Mon May 06 10:49:50 2019 +0000
+++ b/MenuClasses/Tutorial/Tutorial.h	Mon May 06 14:28:35 2019 +0000
@@ -12,57 +12,68 @@
     Tutorial();
     ~Tutorial();
     
+    /** Initialise Tutorial
+    *
+    *   This function passes the pointers to the tutorial class so that it can control the screen and the gamepad.
+    */
+    void init(N5110 *lcd, Gamepad *pad);
+    
     /** Implement Tutorial
     *
     *   This function is used to configure Tutorial.
     */
-    void Implement(N5110 &lcd, Gamepad &pad);
+    void Implement();
     
     /** Check Back Pressed
     *
     *   This function makes a centralised approach to check when back is pressed in a loop, so that it can be used to exit it and also go to.
     *   the previous menu option.
     */
-    bool checkBackPressed(Gamepad &pad);
+    bool checkBackPressed();
     
     /** game Pad
     *
     *   This function introduces the gamepad to the user.
     */
-    void gamePad(N5110 &lcd, Gamepad &pad);
+    void gamePad();
     
     /** settings
     *
     *   This function shows how to control parameters in settings.
     */
-    void settings(N5110 &lcd, Gamepad &pad);
+    void settings();
     
     /** Controls To Navigate In Menu
     *
     *   This function shows how to scroll through menu.
     */
-    void controlsToNavigateInMenu(N5110 &lcd, Gamepad &pad);
+    void controlsToNavigateInMenu();
     
     /** Controls To Navigate through Game Mode and Game Speed.
     *
     *   This function shows how to scroll through menu.
     */
-    void controlsToNavigateGameModeSpeed(N5110 &lcd, Gamepad &pad);
+    void controlsToNavigateGameModeSpeed();
     
     /** Controls To Play Game.
     *
     *   This function shows how to move the snake in the game.
     */
-    void controlsToPlayGame(N5110 &lcd, Gamepad &pad);
+    void controlsToPlayGame();
     
     /** ControlsvForvPreviousvOr Next.
     *
     *   This function shows how to start/end the game and also go to the next/previous menu.
     */
-    void controlsForPreviousOrNext(N5110 &lcd, Gamepad &pad);
+    void controlsForPreviousOrNext();
     
 private:
     bool _backPressed; //remembers if back is pressed.
     
+    //Pointer to the game pad object pad.
+    Gamepad *_pad;
+    //Pointer to the N5110 object lcd.
+    N5110 *_lcd;
+    
 };
 #endif
\ No newline at end of file