Mochu Yao explorer game

Dependencies:   mbed

menu/Menu.h

Committer:
el17my
Date:
2020-04-28
Revision:
26:4d193529b447
Parent:
23:7be9701fc1b8
Child:
27:354d91d59b6d

File content as of revision 26:4d193529b447:

#ifndef MENU_H
#define MENU_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Gameengine.h"
//*using the UpDown_counter example in class 201.
struct State {
  int output;
  int next_state[4]; 
};

/** Menu class
* @ 1 build three page to choose
* @ 2 build a good welcome_page
* @ 3 connect with the gamepad and makesure the game is working
* @ date April 27th 2020
* @ author Yaomochu
*/


class Menu {
 public:
    Menu();
    ~Menu();
    void init();
    void run_engine(N5110 &lcd, Gamepad &gamepad);
    void run_game(N5110 &lcd, Gamepad &gamepad);

    
private:
    void display_page1(N5110 &lcd, Gamepad &gamepad);
    void display_page2(N5110 &lcd, Gamepad &gamepad);
    void get_output(N5110 &lcd, Gamepad &gamepad);
    void get_input(bool start, bool back, bool b);
    Gameengine _game_engine;
    int _input_value;
    int _output;
    int _state;
    };
#endif