aboutsummaryrefslogtreecommitdiff
path: root/src/Model/Game.elm
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-03-07 18:46:47 +0100
committerJoris Guyonvarch2015-03-07 18:46:47 +0100
commit6c1f5e10631a3f66f4c85a45b6f28ffd366105c5 (patch)
tree624d833aa62ad8ce5ed172144ff69a2846d55154 /src/Model/Game.elm
parentae14beca0452b59ead64b8cdd6544824d59a55dc (diff)
downloadcatchvoid-6c1f5e10631a3f66f4c85a45b6f28ffd366105c5.tar.gz
catchvoid-6c1f5e10631a3f66f4c85a45b6f28ffd366105c5.tar.bz2
catchvoid-6c1f5e10631a3f66f4c85a45b6f28ffd366105c5.zip
Show best score in html layout
Diffstat (limited to 'src/Model/Game.elm')
-rw-r--r--src/Model/Game.elm33
1 files changed, 12 insertions, 21 deletions
diff --git a/src/Model/Game.elm b/src/Model/Game.elm
index 4ef5d89..705841d 100644
--- a/src/Model/Game.elm
+++ b/src/Model/Game.elm
@@ -14,29 +14,20 @@ import Model.Config (..)
type alias Game =
{ time : Float
, keysDown : List KeyCode
- , score : Int
+ , currentScore : Int
, player : Player
, cloud : Cloud
- , bestScore : Int
+ , scores : List Int
, seed : Seed
}
-initialGame : Seed -> Vec2 -> Config -> Int -> Game
-initialGame seed playerPos config bestScore =
- let initPlayer =
- { pos = playerPos
- , speed =
- { x = 0
- , y = 0
- }
- , config = config
- }
- in
- { time = 0
- , keysDown = []
- , score = 0
- , player = initPlayer
- , cloud = initCloud
- , bestScore = bestScore
- , seed = seed
- }
+initialGame : Seed -> Game
+initialGame seed =
+ { time = 0
+ , keysDown = []
+ , currentScore = 0
+ , player = initPlayer
+ , cloud = initCloud
+ , scores = []
+ , seed = seed
+ }