Craig Evans
/
ELEC2645_Pong2021
Pong game for ELEC1620 board.
Diff: lib/Paddle.cpp
- Revision:
- 3:5746c6833d73
- Parent:
- 2:482d74ef09c8
--- a/lib/Paddle.cpp Wed Mar 10 16:37:52 2021 +0000 +++ b/lib/Paddle.cpp Thu Mar 11 14:54:25 2021 +0000 @@ -20,9 +20,7 @@ void Paddle::update(UserInput input) { printf("Paddle: Update\n"); - _speed = int(input.mag*_height); // speed of movement changes depending on - // how far the joystick is pushed (0 to 1) and the height of the paddle - + _speed = 2; // update y value depending on direction of movement // North is decrement as origin is at the top-left so decreasing moves up if (input.d == N) { _y-=_speed; }