Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Card ¶
type Card struct {
CardType string `json:"cardType"`
Storm *stormCard `json:"storm,omitempty"`
}
type Deck ¶
type Deck struct {
// contains filtered or unexported fields
}
type DeckEvent ¶
type DeckEvent struct {
Action string `json:"action"`
Card *Card `json:"card"`
Length int `json:"length"`
}
A DeckEvent is a notification of a change happening to a Deck Action will be one of "shuffle", "add", or "draw"
type Game ¶
type Game struct {
Id GameId
Name string
StormDeck *Deck
StormDiscard *Deck
GearDeck *Deck
GearDiscard *Deck
}
func (*Game) DrawGearCard ¶
func (*Game) DrawStormCard ¶
func (*Game) HandleAction ¶
func (g *Game) HandleAction(a GameAction) error
type GameAction ¶
type GameAction struct {
Action string
}
type GameManager ¶
type GameManager struct {
// contains filtered or unexported fields
}
func (*GameManager) FindGame ¶
func (g *GameManager) FindGame(id GameId) *Game
func (*GameManager) ListGames ¶
func (g *GameManager) ListGames() []*Game
func (*GameManager) NewGame ¶
func (g *GameManager) NewGame(ngd NewGameData) (*Game, error)
type NewGameData ¶
type NewGameData struct {
Name string `json:"name"`
}
Click to show internal directories.
Click to hide internal directories.