Ahmed Adamjee
/
SnakeVSBlock
Snake vs Block Game to be run upon K64F.
Diff: MenuClasses/Tutorial/Tutorial.h
- Revision:
- 90:741120c09784
- Parent:
- 85:d50ba0994676
- Child:
- 91:ca8cff78f2fe
--- a/MenuClasses/Tutorial/Tutorial.h Wed May 08 19:05:30 2019 +0000 +++ b/MenuClasses/Tutorial/Tutorial.h Wed May 08 21:01:20 2019 +0000 @@ -5,102 +5,68 @@ #include "N5110.h" #include "Gamepad.h" +/** Tutorial Class +@brief Class for allowing the user to know more about the game using sprites, texts and interactive controls.. +@author Ahmed N.Adamjee +@date 8th May 2019 +*/ class Tutorial { public: - + + /** Constructor */ Tutorial(); + /** Destructor */ ~Tutorial(); - /** Initialise Tutorial - * - * This function passes the pointers to the tutorial class so that it can control the screen and the gamepad. + /** Gets pointers of lcd and pad from int main() to be used privately in the entire class. + * @param pointer to the N5110 object in main, address of this pointer is saved to make availability to the entire class, without passing address to each function. + * @param pointer to the gamepad object in main, address of this pointer is saved to make availability to the entire class, without passing address to each function. */ void init(N5110 *lcd, Gamepad *pad); - /** Implement Tutorial - * - * This function is used to configure Tutorial. - */ + /** Used to call all Tutorial functions and go forth and exit the tutorial functions.*/ 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. + + /** Checks BACK if button pressed in a loop, can be used to exit it and also remember if true/false and used for various conditions. + * @return True if the BACK pressed, else False. */ bool checkBackPressed(); - /** game Pad - * - * This function introduces the gamepad to the user. - */ + /** Introduces how to use the gamepad to the user for this tutorial.*/ void gamePad(); - /** settings - * - * This function shows how to control parameters in settings. - */ + /** Shows how to control parameters in settings.*/ void settings(); - /** Controls To Navigate In Menu - * - * This function shows how to scroll through menu. - */ + /** 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. - */ + /** Shows how to scroll through Game Mode and Game Speed Menus.*/ void controlsToNavigateGameModeSpeed(); - /** Controls To Play Game. - * - * This function shows how to move the snake in the game. - */ + /** 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. - */ + /** 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. - */ + /** Takes us to tutorial of why to avoid the blocks.*/ void BlockTutorialA(); - /** Block Tutorial B. - * - * This function displays to the user what the block does. - */ + /** Explains 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. - */ + /** Conveys 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. - */ + /** 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. - */ + /** 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. - */ + /** Talks us through some general information about the game.*/ void GeneralInfo();