goat_game

package
v0.0.7-zinx Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGroup

func CreateGroup(base *entry.GroupBase) entry.Group

func CreatePlayer

func CreatePlayer(base *entry.PlayerBase, pInfo *pto.PlayerInfo) entry.Player

func CreateRoom

func CreateRoom(base *entry.RoomBase) entry.Room

func CreateTeam

func CreateTeam(base *entry.TeamBase) entry.Team

Types

type Attribute

type Attribute struct {
	MMR           float64 `json:"mmr"`
	Star          int     `json:"star"`
	Rank          int     `json:"rank"`
	TotalPvpCount int64   `json:"total_pvp_count"`
	TodayPvpCount int64   `json:"today_pvp_count"`
}

type Group

type Group struct {
	*glicko2.GroupBaseGlicko2
}

type Player

type Player struct {
	// combined with the struct implementing the matching strategy
	// to support different matching strategies
	*glicko2.PlayerBaseGlicko2

	// some game mode specific fields
	TotalPvpCount int64
	TodayPvpCount int64
}

func (*Player) SetAttr

func (p *Player) SetAttr(attr *pto.UploadPlayerAttr) error

SetAttr rewrite the base method if needed.

type Room

type Room struct {
	*glicko2.RoomBaseGlicko2
}

type Team

type Team struct {
	*glicko2.TeamBaseGlicko2
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL