blob: 83d8baaf199cb115304743d492f389279be9d949 (
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
|
module Game where
import Player (..)
import Cloud (..)
import Vec2 (Vec2)
type Game =
{ time : Float
, score : Int
, player : Player
, cloud : Cloud
, bestScore : Int
}
initialGame : Vec2 -> Int -> Game
initialGame playerPos bestScore =
let initPlayer =
{ pos = playerPos
, speed = { x = 0, y = 0 }
}
in
{ time = 0
, score = 0
, player = initPlayer
, cloud = initCloud
, bestScore = bestScore
}
|