Yang Zhenye 201199680
Dependencies: mbed
Diff: RoonyEngine/RoonyEngine.h
- Revision:
- 3:30c81344beff
- Parent:
- 2:baca89f466bc
--- a/RoonyEngine/RoonyEngine.h Thu Apr 30 07:08:09 2020 +0000 +++ b/RoonyEngine/RoonyEngine.h Fri May 08 09:09:49 2020 +0000 @@ -0,0 +1,38 @@ +#ifndef "ROONYENGINE" +#define "ROONYENGINE" + +#include "mbed.h" +#include "N5110.h" +#include "Gamepad.h" +#include "Ronny.h" +#include "Ball.h" + +class RonnyEngine{ + public: + RonnyEngine(); + ~RonnyEngine(); + void init(); + void reset(); + void check_reset(N5110 &lcd, Gamepad &gamepad); + void check_start(N5110 &lcd, Gamepad &gamepad); + void check_collision(Gamepad &gamepad); + void get_score(); + void get_sprite(); + void update_lcd(N5110 &lcd); + void run_engine(N5110 &lcd, Gamepad &gamepad); + bool get_reset_flag(); + bool get_start_flag(); + void get_ronny_x(Gamepad &gamepad); + private: + int _player_x; + int _player_y; + int _x; + int _y; + bool _collision_flag; + bool _start_flag; + bool _reset_flag; + int _speed; + int _player_score; +} +#endif + \ No newline at end of file