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: Rocket/Rocket.cpp
- Revision:
- 6:7b733b2a6cf6
- Parent:
- 3:489437d4ebd7
- Child:
- 7:06c86ec1f19d
diff -r b230e79d36d6 -r 7b733b2a6cf6 Rocket/Rocket.cpp --- a/Rocket/Rocket.cpp Thu Apr 19 17:46:28 2018 +0000 +++ b/Rocket/Rocket.cpp Fri Apr 20 21:03:05 2018 +0000 @@ -61,4 +61,20 @@ if (_x > WIDTH - 7) { _x = WIDTH - 7; } +} + +Vector2D Rocket::get_pos() { + Vector2D p = {_x,_y}; + return p; +} + + +void Rocket::add_score() +{ + _score++; +} + +int Rocket::get_score() +{ + return _score; } \ No newline at end of file