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: Ball/Ball.cpp
- Revision:
- 20:9d21599fe350
- Parent:
- 18:a260ce8db9e7
- Child:
- 23:a16c97a59a41
- Child:
- 26:6427f09cf8d3
--- a/Ball/Ball.cpp Sat Apr 27 18:16:59 2019 +0000 +++ b/Ball/Ball.cpp Tue Apr 30 10:27:23 2019 +0000 @@ -83,7 +83,7 @@ int Ball::update_ball(int expected_x,int expected_y){ if (_y!=expected_y){ - if (_y>expected_y){ + if (_y>=expected_y){ _y--; } else{ @@ -91,9 +91,8 @@ } } if (_x!=expected_x){ - if (_x>expected_x){ + if (_x>expected_x) _x--; - } else{ _x++; }