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-27
- Revision:
- 12:07a9f2140d9b
- Parent:
- 10:51870f8e2e1a
- Child:
- 13:3299ab0ff2f0
File content as of revision 12:07a9f2140d9b:
#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 init_unchanged_parameter(); 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); 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 _claw_speed; int _monster_collision; int _now_score; int _highest_score; int _gold_reached_num[9]; //////////////// Direction _d; float _mag; //////////// }; #endif