![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
contains my game for the embedded systems project 2645
Dependencies: mbed FXOS8700CQQQ
GameEngine/RocketRacer.h@9:edb39a8334ee, 2019-03-27 (annotated)
- Committer:
- OmarAlebiary
- Date:
- Wed Mar 27 00:04:00 2019 +0000
- Revision:
- 9:edb39a8334ee
- Parent:
- 8:b547037f42be
- Child:
- 10:7323785c071c
added the game loop method
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 | 6:958376d55d70 | 16 | |
OmarAlebiary | 7:7e50cac5e0f4 | 17 | void MainGameDisplay(N5110 &lcd); |
OmarAlebiary | 7:7e50cac5e0f4 | 18 | void EndGame(N5110 &lcd); |
OmarAlebiary | 9:edb39a8334ee | 19 | void GameLoop(N5110 &lcd,Gamepad &pad); |
OmarAlebiary | 9:edb39a8334ee | 20 | void player_position(N5110 &lcd,char RocketPosition); |
OmarAlebiary | 9:edb39a8334ee | 21 | void enemy_position(N5110 &lcd,int place, int phase); |
OmarAlebiary | 9:edb39a8334ee | 22 | |
OmarAlebiary | 9:edb39a8334ee | 23 | |
OmarAlebiary | 9:edb39a8334ee | 24 | private: |
OmarAlebiary | 9:edb39a8334ee | 25 | //int enemy_0_pos, enemy_1_pos, enemy_phase; |
OmarAlebiary | 9:edb39a8334ee | 26 | // int Joy_X; |
OmarAlebiary | 9:edb39a8334ee | 27 | // int game_speed; |
OmarAlebiary | 9:edb39a8334ee | 28 | // int score; |
OmarAlebiary | 9:edb39a8334ee | 29 | // char POS; |
OmarAlebiary | 9:edb39a8334ee | 30 | // bool enemy_dead; |
OmarAlebiary | 9:edb39a8334ee | 31 | // bool control; |
OmarAlebiary | 6:958376d55d70 | 32 | |
OmarAlebiary | 6:958376d55d70 | 33 | |
OmarAlebiary | 6:958376d55d70 | 34 | |
OmarAlebiary | 6:958376d55d70 | 35 | }; |
OmarAlebiary | 6:958376d55d70 | 36 | |
OmarAlebiary | 6:958376d55d70 | 37 | #endif |