Player Library
Diff: Player.cpp
- Revision:
- 3:60a09496c839
- Parent:
- 2:108a1fc56c4c
- Child:
- 4:6d5ea29f83b0
diff -r 108a1fc56c4c -r 60a09496c839 Player.cpp --- a/Player.cpp Mon Apr 24 11:15:03 2017 +0000 +++ b/Player.cpp Mon Apr 24 11:20:53 2017 +0000 @@ -20,7 +20,7 @@ { _x = WIDTH/2 - 1; // Middle of screen _y = HEIGHT/2; // Near bottom of screen - _speed = 1; // default speed + _speed = 0.3; // default speed } @@ -72,17 +72,17 @@ // check the y origin to ensure that the paddle doesn't go off screen - if (_y < 1) { - _y = 1; + if (_y <= 0) { + _y = 0; } - if (_x < 1) { - _x = 1; + if (_x <= 0) { + _x = 0; } if (_x > 81) { _x = 81; } if (_y > 45) { - _x = 45; + _y = 45; } } \ No newline at end of file