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 Class Reference
MinerEngine Class. More...
#include <MinerEngine.h>
Public Member Functions | |
| MinerEngine () | |
| Constructor. | |
| ~MinerEngine () | |
| Destructor. | |
| void | init (int winch_width, int winch_height, int gold_num, int monster_speed) |
| Initialise the components of the MinerEngine. | |
| void | init_unchanged_parameter () |
| Initialise the unchanged parameter. | |
| void | state_switch (Gamepad &pad, N5110 &lcd) |
| Switch the states. | |
| int | get_select (Gamepad &pad) |
| Get the select. | |
| void | instruction (Gamepad &pad, N5110 &lcd) |
| Print the instruction. | |
| void | menu (Gamepad &pad, N5110 &lcd) |
| Print the menu. | |
| void | options (Gamepad &pad, N5110 &lcd) |
| Select the difficulties. | |
| void | game_run (Gamepad &pad, N5110 &lcd) |
| Run the game. | |
| void | draw (N5110 &lcd) |
| Draw all the components. | |
| void | read_input (Gamepad &pad) |
| Read the gamepad input. | |
| void | update (Gamepad &pad) |
| Update the data. | |
| void | welcome (Gamepad &pad, N5110 &lcd) |
| Print welcome component and wait for start. | |
| void | game_over (Gamepad &pad, N5110 &lcd) |
| Print game over on the screen. | |
| void | play_music (Gamepad &pad) |
| Play the music. | |
| void | screen_rollup (Gamepad &pad, N5110 &lcd) |
| Roll up the picture. | |
| void | loading (Gamepad &pad, N5110 &lcd) |
| Print loading on the screen. | |
| void | tunnel (Gamepad &pad, N5110 &lcd) |
| Play the tunnel animation on the screen. | |
| void | draw_tunnel (N5110 &lcd) |
| Draw the tunnel. | |
| void | draw_man (N5110 &lcd) |
| Draw the walking man. | |
| void | tunnel_print (Gamepad &pad, N5110 &lcd) |
| Print message in the tunnel. | |
Detailed Description
MinerEngine Class.
Class for the structure of the game It includes the control input, menu and other display parts(welcome,select,gameover,etc)
- Date:
- May 2020
Definition at line 22 of file MinerEngine.h.
Constructor & Destructor Documentation
| MinerEngine | ( | ) |
Constructor.
Definition at line 4 of file MinerEngine.cpp.
| ~MinerEngine | ( | ) |
Destructor.
Definition at line 9 of file MinerEngine.cpp.
Member Function Documentation
| void draw | ( | N5110 & | lcd ) |
Draw all the components.
- Parameters:
-
lcd - N5110 library
Definition at line 352 of file MinerEngine.cpp.
| void draw_man | ( | N5110 & | lcd ) |
Draw the walking man.
- Parameters:
-
lcd - N5110 library
Definition at line 626 of file MinerEngine.cpp.
| void draw_tunnel | ( | N5110 & | lcd ) |
Print game over on the screen.
Definition at line 452 of file MinerEngine.cpp.
Run the game.
Definition at line 285 of file MinerEngine.cpp.
| int get_select | ( | Gamepad & | pad ) |
| void init | ( | int | winch_width, |
| int | winch_height, | ||
| int | gold_num, | ||
| int | monster_speed | ||
| ) |
Initialise the components of the MinerEngine.
- Parameters:
-
winch_width - the width of the winch winch_height - the height of the winch gold_num - the gold number monster_speed - the speed of monster
Definition at line 108 of file MinerEngine.cpp.
| void init_unchanged_parameter | ( | ) |
Initialise the unchanged parameter.
Definition at line 140 of file MinerEngine.cpp.
Print the instruction.
Definition at line 181 of file MinerEngine.cpp.
Print loading on the screen.
Definition at line 551 of file MinerEngine.cpp.
Print the menu.
Definition at line 231 of file MinerEngine.cpp.
Select the difficulties.
Definition at line 259 of file MinerEngine.cpp.
| void play_music | ( | Gamepad & | pad ) |
| void read_input | ( | Gamepad & | pad ) |
Read the gamepad input.
- Parameters:
-
pad - Gamepad library
Definition at line 341 of file MinerEngine.cpp.
Roll up the picture.
Definition at line 534 of file MinerEngine.cpp.
Switch the states.
Definition at line 145 of file MinerEngine.cpp.
Play the tunnel animation on the screen.
Definition at line 579 of file MinerEngine.cpp.
Print message in the tunnel.
Definition at line 641 of file MinerEngine.cpp.
| void update | ( | Gamepad & | pad ) |
Generated on Sat Jul 16 2022 10:18:04 by
1.7.2