aboutsummaryrefslogtreecommitdiff
path: root/src/Main.elm
blob: 9286ed9f6c7802c2cdc6b659a35bc652b9067557 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module Main where

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

import Game (Game, initialGame)
import Display (display)
import Step (step)
import Input (getInput)
import Vec2 (originVec)

main : Signal Html
main = Signal.map display game

game : Signal Game
game = Signal.foldp step (initialGame initialSeed originVec 0) getInput

port initialTime : Int

initialSeed : Random.Seed
initialSeed = Random.initialSeed initialTime