Game codes for Pokemon Academy Yiu Fai Kwok - 201198802 I have read the University Regulations on Plagiarism and state that the work covered by this declaration is my own and does not contain any unacknowledged work from other sources.
Dependencies: mbed FXOS8700CQ mbed-rtos
Diff: Game_two/Twitter_files/Twitter.h
- Revision:
- 19:903d67bb0dea
- Parent:
- 14:abe64fe0b6a5
--- a/Game_two/Twitter_files/Twitter.h Sun Apr 21 11:07:43 2019 +0000 +++ b/Game_two/Twitter_files/Twitter.h Sun Apr 21 12:14:59 2019 +0000 @@ -14,15 +14,59 @@ { public: + + + /** Constructor */ Twitter(); + /** Deconstructor */ ~Twitter(); + + /** + * @brief Initialize the class parameters + * @param speed (int) + * @details Initialize the object's position and speed by randomizing a number between 0-7. + */ void init(int speed); + + /** + * @brief Draw the object + * @details Draw the object according the position _x and _y. + */ void draw(N5110 &lcd); + + /** + * @brief Update the object + * @details Update the new position of the object determined by the speed parameter and initial position + */ void update(); - /// accessors and mutators + + // accessors and mutators + /** + * @brief Set the object's velocity + * @param velocity v (Vector2D) + * @details Set the velocity of the object according to the initial set up from the init(int speed) function + */ void set_velocity(Vector2D v); + + /** + * @brief Get the object's velocity + * @return the current velocity (Vector2D) + * @details Get the velocity of the object and return as Vector2D + */ Vector2D get_velocity(); + + /** + * @brief Get the object's position + * @return the current position (Vector2D) + * @details Get the position x and y of the object and return as Vector2D + */ Vector2D get_pos(); + + /** + * @brief Set the object's position + * @param the value of position p (Vector2D) + * @details Set the position x and y of the object according to the input p + */ void set_pos(Vector2D p); private: