![](/media/cache/profiles/LinkedIn_0NghoZJ.jpeg.50x50_q85.jpg)
Snake vs Block Game to be run upon K64F.
MenuClasses/Tutorial/Tutorial.h
- Committer:
- AhmedPlaymaker
- Date:
- 2019-05-06
- Revision:
- 83:329da564799a
- Parent:
- 80:51ca38c5dcdf
- Child:
- 85:d50ba0994676
File content as of revision 83:329da564799a:
#ifndef TUTORIAL_H #define TUTORIAL_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" class Tutorial { public: 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(); /** 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(); /** game Pad * * This function introduces the gamepad to the user. */ void gamePad(); /** settings * * This function shows how to control parameters in settings. */ void settings(); /** Controls To Navigate In Menu * * This function shows how to scroll through menu. */ void controlsToNavigateInMenu(); /** Controls To Navigate through Game Mode and Game Speed. * * This function shows how to scroll through menu. */ void controlsToNavigateGameModeSpeed(); /** Controls To Play Game. * * This function shows how to move the snake in the game. */ void controlsToPlayGame(); /** ControlsvForvPreviousvOr Next. * * This function shows how to start/end the game and also go to the next/previous menu. */ 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