Mochu Yao explorer game
Dependencies: mbed
Diff: Gameengine/Gameengine.h
- Revision:
- 26:4d193529b447
- Parent:
- 23:7be9701fc1b8
- Child:
- 27:354d91d59b6d
--- a/Gameengine/Gameengine.h Tue Apr 28 17:30:29 2020 +0000 +++ b/Gameengine/Gameengine.h Tue Apr 28 17:39:26 2020 +0000 @@ -14,46 +14,6 @@ struct Coordinate { Vector2D coord; /**< Vector 2D for joystick coords */ }; -/** Gameengine Class -* @1 make the whole explorer game run and set the score the reset process -* @2 cheak the collision and the reset or fall flag -* @3 draw on the lcd screen and load the gamepad controll -* @date April 24th 2020 -* @author Yaomochu -* @code - -#include "mbed.h" -#include "N5110.h" -#include "Gamepad.h" -#include "Gameengine.h" - -N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); -Gamepad gamepad; -Gameengine _game_engine; - -bool _start_flag; -int _player_score; - -int main() { - _game_engine.init(); - while(1) { - _game_engine.check_reset(lcd, gamepad); - _start_flag = _game_engine.get_start_flag(); - _game_engine.read_input(gamepad); - _game_engine.get_sprite(); - _game_engine.get_explorer_direction(); - _game_engine.get_explorer_y(gamepad); - _game_engine.get_explorer_x(); - _game_engine.generate_lines(); - _game_engine.check_collision(gamepad); - _game_engine.update_lcd(lcd); - _player_score = _game_engine.get_score(); - _game_engine.run_engine(lcd, gamepad); - } -} - -* @endcode -*/ class Gameengine { // Constructor and destructor.