zhenye yang
/
el17zy
Yang Zhenye 201199680
Diff: RooneyEngine/RooneyEngine.h
- Revision:
- 4:eb8dca1dc341
- Parent:
- 3:30c81344beff
- Child:
- 5:fcad75e9b9e1
diff -r 30c81344beff -r eb8dca1dc341 RooneyEngine/RooneyEngine.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/RooneyEngine/RooneyEngine.h Wed May 13 14:55:07 2020 +0000 @@ -0,0 +1,38 @@ +#ifndef "ROONEYENGINE" +#define "ROONEYENGINE" + +#include "mbed.h" +#include "N5110.h" +#include "Gamepad.h" +#include "Rooney.h" +#include "Ball.h" + +class RooneyEngine{ + public: + RooneyEngine(); + ~RooneyEngine(); + 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_ronney_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