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: Paddle/Paddle.cpp
- Revision:
- 1:e18615d46071
- Parent:
- 0:7d4d2023ed9c
- Child:
- 9:f6f0f39538c7
--- a/Paddle/Paddle.cpp Tue Apr 16 18:58:18 2019 +0000
+++ b/Paddle/Paddle.cpp Wed Apr 17 21:19:16 2019 +0000
@@ -11,10 +11,10 @@
}
-void Paddle::init(int x,int height,int width)
+void Paddle::init(int y,int height,int width)
{
- _x = x; // x value on screen is fixed
- _y = HEIGHT/2 - height/2; // y depends on height of screen and height of paddle
+ _x = WIDTH/2 - width/2; // x value on screen is fixed
+ _y = y; // y depends on height of screen and height of paddle
_height = height;
_width = width;
_speed = 1; // default speed