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
Diff: TankEngine/TankEngine.h
- Revision:
- 1:679d7ada8de7
- Parent:
- 0:8fb740fa6356
--- a/TankEngine/TankEngine.h Sat May 11 14:58:43 2019 +0000 +++ b/TankEngine/TankEngine.h Sun May 12 13:43:27 2019 +0000 @@ -7,18 +7,39 @@ #include "MainTank.h" #include "Rocket.h" +/** TankEngine Class + * @brief Set and update the engine of game(include rocket and tank) + * @author Pengxi Huang + * @date may,2019 + */ class TankEngine { public: - + /** Constructor */ TankEngine(); + /** Destructor */ ~TankEngine(); - + /** Inital the every value + * @param the all value of the class(int) + */ void init(); + /** Set the Value of direction and magnitude + * @param the value of the new position(Vector2D) + */ void read_input(Gamepad &pad); + /** Set the new position and do collaps detect + * @param the value of the new position(Vector2D) + */ void update(Gamepad &pad); + /// accessors and mutators void Draw(N5110 &lcd); + /** Get the life + * @return the current life + */ int get_life(); + /** Get the score + * @return the current score + */ int hello_score(); private: