You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
783 B
Go
37 lines
783 B
Go
package manager
|
|
|
|
type GameStatus int32
|
|
|
|
const (
|
|
GameInit GameStatus = iota + 1 // 游戏已经初始化
|
|
GameStarted // 游戏已经开始
|
|
GameEnded // 游戏已结束
|
|
)
|
|
|
|
type (
|
|
RoomMeta struct {
|
|
ID int64 // ID
|
|
GameType string // 类型
|
|
IsDefault bool // 是否默认
|
|
}
|
|
|
|
RoomData struct {
|
|
BattleId int64 // 战局ID
|
|
CurrentStatus GameStatus // 当前战局状态
|
|
UserMap map[int32]map[int64]User // 当前房间加入游戏的玩家 (team)
|
|
}
|
|
|
|
User struct {
|
|
ID int64 // uid
|
|
Platform string // 平台
|
|
Username string // 用户名
|
|
Avatar string // 头像
|
|
Team int32 // 队伍
|
|
}
|
|
|
|
LiveRoom struct {
|
|
ID int64
|
|
Platform string
|
|
}
|
|
)
|