on master help sign in
Fixes #103: Change paddle step directions to match keys
commit121bab68fd605ea514f753ecaa3d1cb4de8e3793 authorKieran <kieran@kjgorman.com> dateMon 11 Mar 2013, 14:59 (14 years ago) parentcf173a9
1 file changed+1−1
Examples/elm-js/Pong/Pong.elm+1−1
Examples/elm-js/Pong/Pong.elm+1−1
@@ -156,7 +156,7 @@ defaultGame = GameState BetweenRounds
156156-- by keyboard input).
157157
158158stepPaddle 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)
160160
161161
162162-- We must also step the ball forward. This is more complicated due to