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:
- 89:806679ed11f2
- Parent:
- 75:d96b177585aa
- Child:
- 90:aea4a1a0f583
- Child:
- 91:c01a736fb0d9
diff -r ddb9fe0db91b -r 806679ed11f2 Paddle/Paddle.cpp
--- a/Paddle/Paddle.cpp Mon May 06 19:20:10 2019 +0000
+++ b/Paddle/Paddle.cpp Mon May 06 19:24:32 2019 +0000
@@ -17,13 +17,13 @@
{
_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;
- _sens = 0.5;
- _speed = 4; // default speed
- _score = 0; // start score from zero
- _lives = 6;
- _tilt = false; //use to choose between motion methods
+ _height = height; // paddle height, defined at init
+ _width = width; // paddle width, defined at init
+ _sens = 0.5; // default sensitivity of tilt/joystick
+ _speed = 4; // default speed = _speed * _sens
+ _score = 0; // start score from 0
+ _lives = 6; // number of lives = number of LEDs
+ _tilt = false; //used to choose between motion methods
}