Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed FXOS8700CQ mbed-rtos
Diff: Game_three/Game_three.h
- Revision:
- 29:75a05e9f0e8d
- Parent:
- 28:a6726a3f8e6d
- Child:
- 30:0ff3bede5307
--- a/Game_three/Game_three.h Mon May 06 02:42:34 2019 +0000 +++ b/Game_three/Game_three.h Mon May 06 20:35:37 2019 +0000 @@ -25,24 +25,58 @@ /** Deconstructor */ ~Game_three(); + /** + * @brief Initialize the parameters + * @details Initialize the parameters, count and score in the class + */ void init_para(); + + /** + * @brief Initialize the randomization + * @param setting r (int) + * @details Initialize the setting (r) to set the randomization of the location of books and messages + */ void init(Gamepad &pad, int r); + + /** + * @brief Render the lcd screen + * @param setting r (int) + * @details Render all objects in game, draw object sprite according to (r) parameter to determine their location + */ void render(N5110 &lcd, int r); + + /** + * @brief Draw function for Game 3 + * @param setting r (int) + * @details Draw function of Game 3 which draw all objects to the changing variables of positions according to constant (r) + */ void draw(N5110 &lcd, int r); + + /** + * @brief Read input from Gamepad + * @details Read input from buttons on the Gamepad to determine which item is being selected for the game + */ void read_input(Gamepad &pad); + + /** + * @brief Update the scoring and count + * @param setting r (int) + * @details Update the parameters score and count depending on the setting parameter r compared with which input is read from the Gamepad buttons + */ void update(Gamepad &pad, int r); - void set_count(int count); - /** * @brief Get count value * @return The current count (int) - * @details The function returns the number of coins that have appeared in the game to terminate the game loop once count reaches 10 + * @details The function returns the number of rounds that have taken place in the game to terminate the game loop once count reaches 5 */ int get_count(); - void set_score(int score); - + /** + * @brief Get score value + * @return The current score (int) + * @details The function returns the score that player has obtained in the game + */ int get_score(); /**