contains my game for the embedded systems project 2645

Dependencies:   mbed FXOS8700CQQQ

Committer:
OmarAlebiary
Date:
Sun Apr 07 18:19:48 2019 +0000
Revision:
15:8a768106c297
Parent:
14:8df7e6fced07
Child:
16:93a8147a4358
fixed lcd contrast

Who changed what in which revision?

UserRevisionLine numberNew 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 15:8a768106c297 11 //enum class Position { Goalkeeper, Defender, Midfielder, Forward };
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 15:8a768106c297 32 int first_enemy_position;
OmarAlebiary 15:8a768106c297 33 int second_enemy_position;
OmarAlebiary 15:8a768106c297 34 int enemy_phase;
OmarAlebiary 13:cec06eb1d7b0 35 int game_speed;
OmarAlebiary 13:cec06eb1d7b0 36 int score;
OmarAlebiary 14:8df7e6fced07 37 char Init_position;
OmarAlebiary 13:cec06eb1d7b0 38 bool enemy_dead;
OmarAlebiary 13:cec06eb1d7b0 39 bool control;
OmarAlebiary 6:958376d55d70 40
OmarAlebiary 6:958376d55d70 41 };
OmarAlebiary 6:958376d55d70 42
OmarAlebiary 6:958376d55d70 43 #endif