aboutsummaryrefslogtreecommitdiff
path: root/src/Main.elm
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-03-04 23:27:59 +0100
committerJoris Guyonvarch2015-03-05 00:27:32 +0100
commit4d007f6802246c6411a2838e68e957c2b4d56d3d (patch)
tree70519a5a2d6825bf2b64f6a8950a003b2ff4f150 /src/Main.elm
parentd37a301ed39bac823e0f2223b8d229b417e128c7 (diff)
Adapt the game to elm version 0.14.1
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