Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CurrentParties = Parties{ Parties: make([]*Party, 0), }
CurrentParties contains parties created by now.
Functions ¶
This section is empty.
Types ¶
type Parties ¶
type Parties struct { Parties []*Party // contains filtered or unexported fields }
Parties contains a thread-safe parties collection.
func (*Parties) GetParties ¶
func (*Parties) RemoveParty ¶
type Party ¶
type Party struct { Id string `json:"id"` Players []*Player `json:"players"` AvgSkill int `json:"avg_skill"` Size int `json:"size"` Width int `json:"-"` Height int `json:"-"` MapId string `json:"map_id"` ToConnectById bool `json:"-"` // contains filtered or unexported fields }
Party represent a thread-safe object with ID, player, skill and game field properties.
func NewParty ¶
func NewParty() Party
NewParty creates a new party with random ID, empty players and skill = 0.
func (*Party) RemovePlayer ¶
type Player ¶
type Player struct { Id uuid.UUID `json:"id"` Name string `json:"name"` Skill int `json:"skill"` SkillDelta int `json:"-"` Party *Party `json:"-"` InParty bool `json:"-"` InProcess bool `json:"-"` PartyId string `json:"-"` // contains filtered or unexported fields }
Player represent a thread-safe object with ID, name, skill and party match-making fields.
Click to show internal directories.
Click to hide internal directories.