blob: c86af26c1c77d25969f78aa2e3086ffa31a080b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
module Game where
import Player (..)
import Enemy (..)
import EnemyState (..)
import Vec2 (Vec2)
type Game =
{ time : Float
, player : Player
, enemyState : EnemyState
, bestTime : Float
}
initialGame : Vec2 -> Float -> Game
initialGame playerPos bestTime =
let initPlayer =
{ pos = playerPos
, speed = { x = 0, y = 0 }
}
in { time = 0
, player = initPlayer
, enemyState = initEnemyState
, bestTime = bestTime
}
|