blob: c1bebf579844f564bed3e971813599137e786268 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
module Main exposing
( main
)
import Html.App exposing (programWithFlags)
import Time
import Keyboard
import Keyboard.Extra as Keyboard
import Model exposing (init)
import Msg
import Update exposing (update)
import View exposing (view)
main : Program Float
main =
programWithFlags
{ init = init
, update = update
, subscriptions = (\model ->
Sub.batch
[ Time.every 40 Msg.Time
, Sub.map Msg.Keyboard Keyboard.subscriptions
, Keyboard.downs (\keycode -> if keycode == 69 then Msg.Transform else Msg.NoOp)
]
)
, view = view
}
|