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.
Diff: Character/Character.cpp
- Revision:
- 10:71ced616a64f
- Parent:
- 9:62fe47a1374f
- Child:
- 12:c557b6c9b17a
diff -r 62fe47a1374f -r 71ced616a64f Character/Character.cpp
--- a/Character/Character.cpp Sat May 23 13:26:19 2020 +0000
+++ b/Character/Character.cpp Sun May 24 21:20:40 2020 +0000
@@ -17,7 +17,6 @@
_x = x; // initial x
_y = y; // initial y
_speed = 1; // default speed
- _level = 0; // start score from zero
}
void Character::draw(N5110 &lcd)
@@ -106,3 +105,9 @@
int Character::get_direction(){
return _dir;
}
+void Character::reset(){
+ _x = 40;
+ _y = 22;
+ _dir = 0;
+
+ }