aboutsummaryrefslogtreecommitdiff
path: root/src/Main.elm
blob: f141fcc9a4a284475fe26177aa3cd7d52f5a55c6 (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 where

import Signal
import Random
import Graphics.Element exposing (Element)
import Html exposing (Html)

import Model.Game exposing (Game, initialGame)
import Model.Vec2 exposing (originVec)
import Model.Config exposing (Config(White))

import Update.Update exposing (update)

import Input exposing (getInput)

import View.Game exposing (renderGame)

main : Signal Html
main = Signal.map renderGame game

game : Signal Game
game =
  Signal.foldp
    update
    (initialGame (Random.initialSeed initialTime))
    getInput

port initialTime : Int