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: rec/rect.cpp
- Revision:
- 27:eab2cf10554e
- Parent:
- 19:362ad1cd6d4a
- Child:
- 28:85ddd500a116
--- a/rec/rect.cpp Mon Apr 30 19:12:41 2018 +0000
+++ b/rec/rect.cpp Mon Apr 30 20:29:26 2018 +0000
@@ -29,7 +29,7 @@
//control the movement of rect when joystick moves
//movement of north and south are not allowed
- if (d == W) {
+ if (d == W) {
rect_x-=rect_speed;
} else if (d == E) {
rect_x+=rect_speed;
@@ -37,6 +37,10 @@
}
}
+void rect::init_score()
+{
+ rect_score=0;
+}
void rect::add_score()
{
rect_score++;