aboutsummaryrefslogtreecommitdiff
path: root/src/Main.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.elm')
-rw-r--r--src/Main.elm16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/Main.elm b/src/Main.elm
index 267bb8c..fcafbda 100644
--- a/src/Main.elm
+++ b/src/Main.elm
@@ -1,10 +1,22 @@
module Main where
-import Game (initialGame)
+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 = lift display (foldp step (initialGame originVec 0) getInput)
+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