on master help sign in
Fixes #103: Change paddle step directions to match keys
121bab6Kieran
Examples/elm-js/Pong/Pong.elm+1−1
@@ -156,7 +156,7 @@ defaultGame = GameState BetweenRounds
156-- by keyboard input).
156-- by keyboard input).
157
157
158stepPaddle delta dir (Paddle y) =
158stepPaddle delta dir (Paddle y) =
159− Paddle $ clamp 20 (gameHeight-20) (y + toFloat dir * 200 * delta)
159+ Paddle $ clamp 20 (gameHeight-20) (y - toFloat dir * 200 * delta)
160
160
161
161
162-- We must also step the ball forward. This is more complicated due to
162-- We must also step the ball forward. This is more complicated due to