Skip to content

Commit 987a87f

Browse files
committed
add comment on keyboard example
1 parent e8dc03f commit 987a87f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

examples/keyboard.elm

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
1+
-- Move a square around with the arrow keys: UP, DOWN, LEFT, RIGHT
2+
-- Try making it move around more quickly!
3+
--
4+
-- Learn more about the playground here:
5+
-- https://package.elm-lang.org/packages/evancz/elm-playground/latest/
6+
--
7+
18
import Playground exposing (..)
29

310

411
main =
512
game view update (0,0)
613

14+
715
view computer (x,y) =
816
[ square blue 40
917
|> move x y
1018
]
1119

20+
1221
update computer (x,y) =
1322
( x + toX computer.keyboard
1423
, y + toY computer.keyboard

0 commit comments

Comments
 (0)