aboutsummaryrefslogtreecommitdiff
path: root/src/Game.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/Game.elm')
-rw-r--r--src/Game.elm17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/Game.elm b/src/Game.elm
index 0a12db8..4d68219 100644
--- a/src/Game.elm
+++ b/src/Game.elm
@@ -1,25 +1,31 @@
module Game where
+import Random (..)
+
import Player (..)
import Cloud (..)
import Vec2 (Vec2)
import Config (..)
import Keyboard (KeyCode)
-type Game =
+type alias Game =
{ time : Float
- , keysDown : [KeyCode]
+ , keysDown : List KeyCode
, score : Int
, player : Player
, cloud : Cloud
, bestScore : Int
+ , seed : Seed
}
-initialGame : Vec2 -> Int -> Game
-initialGame playerPos bestScore =
+initialGame : Seed -> Vec2 -> Int -> Game
+initialGame seed playerPos bestScore =
let initPlayer =
{ pos = playerPos
- , speed = { x = 0, y = 0 }
+ , speed =
+ { x = 0
+ , y = 0
+ }
, config = White
}
in
@@ -29,4 +35,5 @@ initialGame playerPos bestScore =
, player = initPlayer
, cloud = initCloud
, bestScore = bestScore
+ , seed = seed
}