contains my game for the embedded systems project 2645
Dependencies: mbed FXOS8700CQQQ
Diff: GameEngine/RocketRacer.h
- Revision:
- 29:e660274d8222
- Parent:
- 28:39607fb67e88
- Child:
- 30:c5060010a1e6
diff -r 39607fb67e88 -r e660274d8222 GameEngine/RocketRacer.h --- a/GameEngine/RocketRacer.h Wed Apr 24 10:19:07 2019 +0000 +++ b/GameEngine/RocketRacer.h Thu Apr 25 10:44:53 2019 +0000 @@ -8,6 +8,7 @@ #include "GameSprites.h" #include "GameTones.h" + /** RocketRacer class @brief C++ class containing the game methods and the interface @@ -26,7 +27,7 @@ // objects Gamepad pad; -RocketRacer rc; +RocketRacer Rocket_Racer; // prototypes @@ -82,12 +83,15 @@ public: /** - * @brief Default Constuctor - * @param None @details Creates the object of class RocketRacer + * @brief Default Constructor + * @details Creates the object of class RocketRacer */ RocketRacer(); - - + /** + * @brief Default destructor + * @details destroys the object of class RocketRacer + */ + ~RocketRacer(); /** * @brief method that has all the screen rendering * @param lcd @details calls the lcd object to draw strings and objects on the display @@ -143,8 +147,46 @@ * @param phase @details the phase of the rocket */ void enemy_position(N5110 &lcd,int place, int phase); - - + /** + * @brief Sets the position + * @param first_enemy_position @details position of the first enemy (as an int) + */ + void set_first_position(int first_enemy_position); + /** + * @brief Sets the position + * @param second_enemy_position @details position of the second enemy (as an int) + */ + void set_second_position(int second_enemy_position); + /** + * @brief Sets the phase + * @param enemy_phase @details phase of the enemy (as an int) + */ + void set_enemy_phase(int enemy_phase); + /** + * @brief Sets the game speed + * @param game_speed @details speed of the game (as an int) + */ + void set_game_speed(int game_speed); + /** + * @brief Sets the game score + * @param score @details score of the game (as an int) + */ + void set_game_score(int score); + /** + * @brief set enemy dead flag + * @param enemy_dead @details flag to indicate dead enemy(as a bool) + */ + void set_enemy_dead(bool enemy_dead) ; + /** + * @brief set control flag + * @param control @details flag for joystick control(as a bool) + */ + void set_control(bool control); + /** + * @brief set initial position + * @param Init_position @details initial position of the player(as an int) + */ + void set_init_position(int Init_position); private: @@ -158,6 +200,7 @@ bool control; GameTones tones; + }; #endif \ No newline at end of file