-
Notifications
You must be signed in to change notification settings - Fork 1
/
game.go
32 lines (31 loc) · 1000 Bytes
/
game.go
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
package main
// LeagueGame is a JSON-encoded game as returned by game_events.php
type LeagueGame struct {
ID int `json:"id"`
Title string `json:"title"`
Status string `json:"status"`
Type string `json:"type"`
Comment string `json:"comment"`
MaxPlayers int `json:"maxPlayers"`
Host string `json:"host"`
Created string `json:"created"`
Updated string `json:"updated"`
Engine string `json:"engine"`
EngineBuild string `json:"engineBuild"`
Flags struct {
JoinAllowed bool `json:"joinAllowed"`
PasswordNeeded bool `json:"passwordNeeded"`
} `json:"flags"`
Scenario struct {
FileSize int `json:"fileSize"`
FileCRC int `json:"fileCRC"`
ContentsCRC int `json:"contentsCRC"`
Filename string `json:"filename"`
Author string `json:"author"`
} `json:"scenario"`
Players []struct {
Name string `json:"name"`
Team int `json:"team"`
Color int `json:"color"`
} `json:"players"`
}