diff options
Diffstat (limited to 'src/Game.elm')
-rw-r--r-- | src/Game.elm | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/Game.elm b/src/Game.elm index c86af26..8de0c40 100644 --- a/src/Game.elm +++ b/src/Game.elm @@ -3,23 +3,27 @@ module Game where import Player (..) import Enemy (..) import EnemyState (..) +import Target(..) import Vec2 (Vec2) type Game = { time : Float , player : Player + , target : Target , enemyState : EnemyState - , bestTime : Float + , bestScore : Int } -initialGame : Vec2 -> Float -> Game -initialGame playerPos bestTime = +initialGame : Vec2 -> Int -> Game +initialGame playerPos bestScore = let initPlayer = - { pos = playerPos - , speed = { x = 0, y = 0 } - } - in { time = 0 - , player = initPlayer - , enemyState = initEnemyState - , bestTime = bestTime - } + { pos = playerPos + , speed = { x = 0, y = 0 } + } + in + { time = 0 + , player = initPlayer + , target = initTarget + , enemyState = initEnemyState + , bestScore = bestScore + } |