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: main.cpp
- Revision:
- 3:fe856d0890ee
- Parent:
- 2:006a2ddfabb6
- Child:
- 4:0e01cbb95434
--- a/main.cpp Wed Mar 20 20:58:36 2019 +0000 +++ b/main.cpp Sat Mar 23 11:17:33 2019 +0000 @@ -47,9 +47,10 @@ { render(); wait(1.0f/fps); - if (ball.endCondition(pad)){ + if (ball.endCondition(pad)) + { break; - } + } } lcd.clear(); lcd.printString("You Lose",20,3); @@ -89,8 +90,11 @@ void render() { lcd.clear(); // initialise the LCD cont.drawPlayer(lcd); - cont.controlPlayer(pad); + cont.controlPlayer(pad); + cont.get_padPos(pad); ball.drawBall(lcd); + ball.get_ballPos(pad); ball.moveBall(); + ball.hitPad(pad); lcd.refresh(); } \ No newline at end of file