blob: 8de0c401c6e7d6896c78b7d9aadfaa2931104167 (
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
26
27
28
29
|
module Game where
import Player (..)
import Enemy (..)
import EnemyState (..)
import Target(..)
import Vec2 (Vec2)
type Game =
{ time : Float
, player : Player
, target : Target
, enemyState : EnemyState
, bestScore : Int
}
initialGame : Vec2 -> Int -> Game
initialGame playerPos bestScore =
let initPlayer =
{ pos = playerPos
, speed = { x = 0, y = 0 }
}
in
{ time = 0
, player = initPlayer
, target = initTarget
, enemyState = initEnemyState
, bestScore = bestScore
}
|