Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
MinerEngine/MinerEngine.h
- Committer:
- ZhongYufan
- Date:
- 2020-04-26
- Revision:
- 7:5bb5cde8951a
- Parent:
- 1:9c7bb3db32bc
- Child:
- 8:c5969685cf02
File content as of revision 7:5bb5cde8951a:
#ifndef MINERENGINE_H #define MINERENGINE_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Claw.h" #include "Winch.h" #include "Monster.h" #include "Gold.h" // gap from edge of screen #define GAP 2 class MinerEngine { public: MinerEngine(); ~MinerEngine(); void init(int winch_width,int winch_height,int gold_num,int monster_speed); void state_switch(Gamepad &pad, N5110 &lcd); int get_select(Gamepad &pad); void instruction(Gamepad &pad, N5110 &lcd); void menu(Gamepad &pad, N5110 &lcd); void options(Gamepad &pad, N5110 &lcd); void game_run(Gamepad &pad, N5110 &lcd); //void check_gold_collision(Gamepad &pad); //void print_scores(N5110 &lcd); void draw(N5110 &lcd); void read_input(Gamepad &pad); void update(Gamepad &pad); //void check_monster_collision(Gamepad &pad); //void check_claw_collision(Gamepad &pad); void claw_down(Gamepad &pad); void welcome(Gamepad &pad, N5110 &lcd); void game_over(Gamepad &pad, N5110 &lcd); void play_music(Gamepad &pad); void screen_rollup(Gamepad &pad, N5110 &lcd); void loading(Gamepad &pad, N5110 &lcd); void fix_x(); private: void check_gold_collision(Gamepad &pad); void check_monster_collision(Gamepad &pad); void check_claw_collision(Gamepad &pad); void check_gold_reload(); void print_scores(N5110 &lcd); ////// Winch _winch; Claw _claw; Gold _gold; Monster _monster; ////////// int _winch_width; int _winch_height; int _gold_num; float _monster_speed; int _s; int _state; int _catching; int _claw_get; int _monster_collision; int _now_score; int _highest_score; //////////////// Direction _d; float _mag; //////////// }; #endif