Installed

elm/browser
1.0.2
elm/core
1.0.5
elm/html
1.0.0
evancz/elm-playground
1.0.3

Registry

elm/http
2.0.0
elm/random
1.0.0
elm/time
1.0.0
elm/file
1.0.5
elm/json
1.1.3
elm/svg
1.0.1
elm-explorations/webgl
1.1.3
w0rm/elm-physics
5.1.3
rtfeldman/elm-css
18.0.0
mdgriffith/elm-ui
1.1.8
​x
 
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
​
8
import Playground exposing (..)
9
​
10
​
11
main =
12
  game view update (0,0)
13
​
14
​
15
view computer (x,y) =
16
  [ square blue 40
17
      |> move x y
18
  ]
19
​
20
​
21
update computer (x,y) =
22
  ( x + toX computer.keyboard
23
  , y + toY computer.keyboard
24
  )