Ahmed Adamjee
/
SnakeVSBlock
Snake vs Block Game to be run upon K64F.
MenuClasses/Tutorial/Tutorial.h
- Committer:
- AhmedPlaymaker
- Date:
- 2019-05-06
- Revision:
- 85:d50ba0994676
- Parent:
- 83:329da564799a
- Child:
- 90:741120c09784
File content as of revision 85:d50ba0994676:
#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(); /** Controls For Previous Or Next. * * This function shows how to start/end the game and also go to the next/previous menu. */ void controlsForPreviousOrNext(); /** Block Tutorial A. * * This function takes us to tutorial of why to avoid them. */ void BlockTutorialA(); /** Block Tutorial B. * * This function displays to the user what the block does. */ void BlockTutorialB(); /** Block Tutorial C. * * This function displays to the user that they can still slide away after colliding. */ void BlockTutorialC(); /** Food Tutorial. * * This function displays to the user how to react to food in way of our game. */ void FoodTutorial(); /** Barrier Tutorial. * * This function takes us to tutorial of what the barrier does in our game. */ void BarrierTutorial(); /** General Information. * * This function talks us through some general information about the game. */ void GeneralInfo(); 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