Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateGameOptions ¶
type CreateGameOptions struct { GameKey string GameID string bg.BoardGameOptions }
CreateGameOptions are the fields necessary for creating a game
type GameErrorMessage ¶
GameErrorMessage is the message sent when there was an error
type GameMessage ¶
type GameMessage struct { GameID string Snapshot bg.BoardGameSnapshot }
GameMessage is the message sent when returning the game snapshot
type GameNetwork ¶
type GameNetwork struct {
// contains filtered or unexported fields
}
func NewGameNetwork ¶
func NewGameNetwork(options GameNetworkOptions) *GameNetwork
func (*GameNetwork) CreateGame ¶
func (n *GameNetwork) CreateGame(options CreateGameOptions) error
func (*GameNetwork) JoinGame ¶
func (n *GameNetwork) JoinGame(options JoinGameOptions) error
type GameNetworkOptions ¶
type GameNetworkOptions struct { Games []bg.BoardGameBuilder // list of game builders to add to the networking layer GameExpiry time.Duration // how long after creation the game will last before being removed }
GameNetworkOptions are the options required to create a new network
Click to show internal directories.
Click to hide internal directories.