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
Fork of el17zl by
Diff: Ppl/Ppl.cpp
- Revision:
- 8:83891ea9a5d9
- Parent:
- 7:6f8aeadc4370
- Child:
- 13:5930f0e5889d
diff -r 6f8aeadc4370 -r 83891ea9a5d9 Ppl/Ppl.cpp
--- a/Ppl/Ppl.cpp Thu Apr 11 14:14:28 2019 +0000
+++ b/Ppl/Ppl.cpp Mon Apr 15 06:55:01 2019 +0000
@@ -108,15 +108,15 @@
if (temp == 0 ) {
_y = _y;
_x = _x;
- } else if (temp == 1) {
+ } else if (temp == 1 && _x <=10) {
_x = 10;
- } else if (temp == 2) {
+ } else if (temp == 2 && _x >=66) {
_x = 66;
- } else if (temp == 3) {
+ } else if (temp == 3 && _y <=12 ) {
_y = 12;
- } else if (temp == 4) {
+ } else if (temp == 4 && _y >=28) {
_y = 28;
- }
+ }
}
void Ppl::hold_ppl_against_wall() // check the y origin to ensure that the paddle doesn't go off screen
