Snake vs Block Game to be run upon K64F.

Dependencies:   mbed

MenuClasses/Tutorial/Tutorial.h

Committer:
AhmedPlaymaker
Date:
2019-05-08
Revision:
90:741120c09784
Parent:
85:d50ba0994676
Child:
91:ca8cff78f2fe

File content as of revision 90:741120c09784:

#ifndef TUTORIAL_H
#define TUTORIAL_H

#include "mbed.h"
#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();
    
    /** 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);
    
    /** Used to call all Tutorial functions and go forth and exit the tutorial functions.*/
    void Implement();

    /** 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();
    
    /** Introduces how to use the gamepad to the user for this tutorial.*/
    void gamePad();
    
    /** Shows how to control parameters in settings.*/
    void settings();
    
    /** Shows how to scroll through menu.*/
    void controlsToNavigateInMenu();
    
    /** Shows how to scroll through Game Mode and Game Speed Menus.*/
    void controlsToNavigateGameModeSpeed();
    
    /** Shows how to move the snake in the game.*/
    void controlsToPlayGame();
    
    /** Shows how to start/end the game and also go to the next/previous menu.*/
    void controlsForPreviousOrNext();
    
    /** Takes us to tutorial of why to avoid the blocks.*/
    void BlockTutorialA();
    
    /** Explains to the user what the block does.*/
    void BlockTutorialB();
    
    /** Conveys to the user that they can still slide away after colliding.*/
    void BlockTutorialC();
    
    /** Displays to the user how to react to food in way of our game.*/
    void FoodTutorial();
    
    /** Takes us to tutorial of what the barrier does in our game.*/
    void BarrierTutorial();
    
    /** 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