blob: 40804823f751b207fbcd6d26dbb27f4308a094b8 (
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
30
31
32
33
34
35
36
37
38
39
40
|
package game
import (
"time"
"github.com/nsfisis/iosdc-japan-2024-albatross/backend/api"
)
type gameType = api.GameGameType
type gameState = api.GameState
const (
gameType1v1 = api.N1V1
gameTypeMultiplayer = api.Multiplayer
gameStateClosed gameState = api.Closed
gameStateWaitingEntries gameState = api.WaitingEntries
gameStateWaitingStart gameState = api.WaitingStart
gameStatePrepare gameState = api.Prepare
gameStateStarting gameState = api.Starting
gameStateGaming gameState = api.Gaming
gameStateFinished gameState = api.Finished
)
type game struct {
gameID int
gameType gameType
state gameState
displayName string
durationSeconds int
startedAt *time.Time
problem *problem
playerCount int
}
type problem struct {
problemID int
title string
description string
}
|