blob: f232fa53d7de40e15430c8d27020e65d4f49f86b (
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
|
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
gameStateWaiting gameState = api.Waiting
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
}
|