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

import Signal
import Random
import Graphics.Element (Element)

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

main : Signal Element
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