![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
contains my game for the embedded systems project 2645
Dependencies: mbed FXOS8700CQQQ
GameEngine/RocketRacer.h@13:cec06eb1d7b0, 2019-04-03 (annotated)
- Committer:
- OmarAlebiary
- Date:
- Wed Apr 03 08:50:46 2019 +0000
- Revision:
- 13:cec06eb1d7b0
- Parent:
- 12:1d3b0218d8d0
- Child:
- 14:8df7e6fced07
added control through right and left buttons
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
OmarAlebiary | 6:958376d55d70 | 1 | #ifndef ROCKETRACER_H |
OmarAlebiary | 6:958376d55d70 | 2 | #define ROCKETRACER_H |
OmarAlebiary | 6:958376d55d70 | 3 | |
OmarAlebiary | 6:958376d55d70 | 4 | #include "mbed.h" |
OmarAlebiary | 6:958376d55d70 | 5 | #include "N5110.h" |
OmarAlebiary | 9:edb39a8334ee | 6 | #include <cstdlib> |
OmarAlebiary | 9:edb39a8334ee | 7 | #include <ctime> |
OmarAlebiary | 6:958376d55d70 | 8 | #include "Gamepad.h" |
OmarAlebiary | 6:958376d55d70 | 9 | |
OmarAlebiary | 6:958376d55d70 | 10 | |
OmarAlebiary | 6:958376d55d70 | 11 | |
OmarAlebiary | 6:958376d55d70 | 12 | |
OmarAlebiary | 6:958376d55d70 | 13 | class RocketRacer{ |
OmarAlebiary | 6:958376d55d70 | 14 | |
OmarAlebiary | 6:958376d55d70 | 15 | public: |
OmarAlebiary | 13:cec06eb1d7b0 | 16 | RocketRacer(); |
OmarAlebiary | 12:1d3b0218d8d0 | 17 | Gamepad Mypad; |
OmarAlebiary | 13:cec06eb1d7b0 | 18 | |
OmarAlebiary | 12:1d3b0218d8d0 | 19 | void Main_Game_Display(N5110 &lcd); |
OmarAlebiary | 12:1d3b0218d8d0 | 20 | void End_Game(Gamepad &pad,N5110 &lcd); |
OmarAlebiary | 13:cec06eb1d7b0 | 21 | |
OmarAlebiary | 12:1d3b0218d8d0 | 22 | void Game_difficulty(Gamepad &pad); |
OmarAlebiary | 11:d4aaa959bb20 | 23 | void Generate_New_Enemy(); |
OmarAlebiary | 11:d4aaa959bb20 | 24 | void Check_Enemy_Dead(N5110 &lcd,Gamepad &pad); |
OmarAlebiary | 11:d4aaa959bb20 | 25 | void Joystick_position(Gamepad &pad); |
OmarAlebiary | 12:1d3b0218d8d0 | 26 | void Game_Loop(N5110 &lcd,Gamepad &pad); |
OmarAlebiary | 9:edb39a8334ee | 27 | void player_position(N5110 &lcd,char RocketPosition); |
OmarAlebiary | 9:edb39a8334ee | 28 | void enemy_position(N5110 &lcd,int place, int phase); |
OmarAlebiary | 9:edb39a8334ee | 29 | |
OmarAlebiary | 9:edb39a8334ee | 30 | |
OmarAlebiary | 9:edb39a8334ee | 31 | private: |
OmarAlebiary | 13:cec06eb1d7b0 | 32 | int first_enemy_position, second_enemy_position, enemy_phase; |
OmarAlebiary | 13:cec06eb1d7b0 | 33 | |
OmarAlebiary | 13:cec06eb1d7b0 | 34 | int game_speed; |
OmarAlebiary | 13:cec06eb1d7b0 | 35 | int score; |
OmarAlebiary | 13:cec06eb1d7b0 | 36 | char POS; |
OmarAlebiary | 13:cec06eb1d7b0 | 37 | bool enemy_dead; |
OmarAlebiary | 13:cec06eb1d7b0 | 38 | bool control; |
OmarAlebiary | 6:958376d55d70 | 39 | |
OmarAlebiary | 6:958376d55d70 | 40 | |
OmarAlebiary | 6:958376d55d70 | 41 | |
OmarAlebiary | 10:7323785c071c | 42 | |
OmarAlebiary | 6:958376d55d70 | 43 | }; |
OmarAlebiary | 6:958376d55d70 | 44 | |
OmarAlebiary | 6:958376d55d70 | 45 | #endif |