Yang Zhenye 201199680

Dependencies:   mbed

Committer:
yangzhenye
Date:
Wed May 13 14:55:07 2020 +0000
Revision:
4:eb8dca1dc341
Parent:
RoonyEngine/RoonyEngine.h@3:30c81344beff
Child:
5:fcad75e9b9e1
advance

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yangzhenye 4:eb8dca1dc341 1 #ifndef "ROONEYENGINE"
yangzhenye 4:eb8dca1dc341 2 #define "ROONEYENGINE"
yangzhenye 3:30c81344beff 3
yangzhenye 3:30c81344beff 4 #include "mbed.h"
yangzhenye 3:30c81344beff 5 #include "N5110.h"
yangzhenye 3:30c81344beff 6 #include "Gamepad.h"
yangzhenye 4:eb8dca1dc341 7 #include "Rooney.h"
yangzhenye 3:30c81344beff 8 #include "Ball.h"
yangzhenye 3:30c81344beff 9
yangzhenye 4:eb8dca1dc341 10 class RooneyEngine{
yangzhenye 3:30c81344beff 11 public:
yangzhenye 4:eb8dca1dc341 12 RooneyEngine();
yangzhenye 4:eb8dca1dc341 13 ~RooneyEngine();
yangzhenye 3:30c81344beff 14 void init();
yangzhenye 3:30c81344beff 15 void reset();
yangzhenye 3:30c81344beff 16 void check_reset(N5110 &lcd, Gamepad &gamepad);
yangzhenye 3:30c81344beff 17 void check_start(N5110 &lcd, Gamepad &gamepad);
yangzhenye 3:30c81344beff 18 void check_collision(Gamepad &gamepad);
yangzhenye 3:30c81344beff 19 void get_score();
yangzhenye 3:30c81344beff 20 void get_sprite();
yangzhenye 3:30c81344beff 21 void update_lcd(N5110 &lcd);
yangzhenye 3:30c81344beff 22 void run_engine(N5110 &lcd, Gamepad &gamepad);
yangzhenye 3:30c81344beff 23 bool get_reset_flag();
yangzhenye 3:30c81344beff 24 bool get_start_flag();
yangzhenye 4:eb8dca1dc341 25 void get_ronney_x(Gamepad &gamepad);
yangzhenye 3:30c81344beff 26 private:
yangzhenye 3:30c81344beff 27 int _player_x;
yangzhenye 3:30c81344beff 28 int _player_y;
yangzhenye 3:30c81344beff 29 int _x;
yangzhenye 3:30c81344beff 30 int _y;
yangzhenye 3:30c81344beff 31 bool _collision_flag;
yangzhenye 3:30c81344beff 32 bool _start_flag;
yangzhenye 3:30c81344beff 33 bool _reset_flag;
yangzhenye 3:30c81344beff 34 int _speed;
yangzhenye 3:30c81344beff 35 int _player_score;
yangzhenye 3:30c81344beff 36 }
yangzhenye 3:30c81344beff 37 #endif
yangzhenye 3:30c81344beff 38