Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMinPlayers = Error{ ErrCode: MinPlayers, // contains filtered or unexported fields } ErrPartyNotReady = Error{ ErrCode: PartyNotReady, // contains filtered or unexported fields } ErrPartyAlreadyStarted = Error{ ErrCode: PartyAlreadyStarted, // contains filtered or unexported fields } ErrPartyOver = Error{ ErrCode: PartyOver, // contains filtered or unexported fields } ErrTooManyPlayers = Error{ ErrCode: TooManyPlayers, // contains filtered or unexported fields } ErrPlayerNotFound = Error{ ErrCode: PlayerNotFound, // contains filtered or unexported fields } ErrTargetNotFound = Error{ ErrCode: TargetNotFound, // contains filtered or unexported fields } ErrNotYourTurn = Error{ ErrCode: NotYourTurn, // contains filtered or unexported fields } ErrCardNotFound = Error{ ErrCode: CardNotFound, // contains filtered or unexported fields } ErrCannotDrawSelf = Error{ ErrCode: CannotDrawSelf, // contains filtered or unexported fields } )
game errors
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { ErrCode // contains filtered or unexported fields }
Error type implements error and adds a code information to be used by a client/frontend. Useful for i18n
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
Game contains the state
type PlayerState ¶
type PlayerState struct { Cards []Card // shuffled hand of the player Players []int64 // all players' ids Readies []bool // who's ready Playing int64 // who's playing Round uint8 // current round CardsRevealed uint8 // cards revealed this round / turn counter DefusesFound uint8 // win condition of Heroes Role Role // team of the player State StateKind // party's state Winner Role }
PlayerState contains the state visible by the player
Source Files
¶
Click to show internal directories.
Click to hide internal directories.