Documentation ¶
Index ¶
- func ConvertFromGetGameResponse(g GetGameResponse) model.Game
- func ModelCardsFromStrings(cs ...string) []model.Card
- type ActiveGame
- type ActiveGamePlayer
- type Card
- type CreateGameRequest
- type CreateGameResponse
- type CreateInteractionRequest
- type CreatePlayerRequest
- type CreatePlayerResponse
- type GetActiveGamesForPlayerResponse
- type GetGameResponse
- type GetGameResponseTeam
- type GetPlayerResponse
- type GetSuggestHandResponse
- type PeggedCard
- type Player
- type PointStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertFromGetGameResponse ¶
func ConvertFromGetGameResponse(g GetGameResponse) model.Game
func ModelCardsFromStrings ¶
Types ¶
type ActiveGame ¶
type ActiveGame struct { GameID model.GameID `json:"gameID"` Players []ActiveGamePlayer `json:"players"` Created string `json:"created"` LastMove string `json:"lastMove"` }
type ActiveGamePlayer ¶
type CreateGameRequest ¶
type CreateGameResponse ¶
type CreateGameResponse struct { ID model.GameID `json:"id"` Players []Player `json:"players"` PlayerColors map[model.PlayerID]string `json:"player_colors,omitempty"` BlockingPlayers map[model.PlayerID]string `json:"blocking_players,omitempty"` CurrentDealer model.PlayerID `json:"current_dealer"` }
func ConvertToCreateGameResponse ¶
func ConvertToCreateGameResponse(g model.Game) CreateGameResponse
type CreatePlayerRequest ¶
type CreatePlayerRequest struct {
Player Player `json:"player"`
}
type CreatePlayerResponse ¶
type CreatePlayerResponse struct {
Player Player `json:"player"`
}
func ConvertToCreatePlayerResponse ¶
func ConvertToCreatePlayerResponse(pm model.Player) CreatePlayerResponse
type GetActiveGamesForPlayerResponse ¶
type GetActiveGamesForPlayerResponse struct { Player Player `json:"player"` ActiveGames []ActiveGame `json:"activeGames"` }
type GetGameResponse ¶
type GetGameResponse struct { ID model.GameID `json:"id"` Teams []GetGameResponseTeam `json:"teams"` Phase string `json:"phase"` CurrentPeg int `json:"current_peg"` BlockingPlayers map[model.PlayerID]string `json:"blocking_players,omitempty"` CurrentDealer model.PlayerID `json:"current_dealer"` Hands map[model.PlayerID][]Card `json:"hands,omitempty"` Crib []Card `json:"crib,omitempty"` CutCard Card `json:"cut_card"` PeggedCards []PeggedCard `json:"pegged_cards,omitempty"` }
func ConvertToGetGameResponse ¶
func ConvertToGetGameResponse(g model.Game) GetGameResponse
type GetGameResponseTeam ¶
type GetPlayerResponse ¶
type GetPlayerResponse struct {
Player Player `json:"player"`
}
func ConvertToGetPlayerResponse ¶
func ConvertToGetPlayerResponse(p model.Player) GetPlayerResponse
type GetSuggestHandResponse ¶
type GetSuggestHandResponse struct { Hand []string `json:"hand"` Toss []string `json:"toss"` HandPts PointStats `json:"handPts"` CribPts PointStats `json:"cribPts"` }
func ConvertToGetSuggestHandResponse ¶
func ConvertToGetSuggestHandResponse( summaries []model.TossSummary, ) []GetSuggestHandResponse
type PeggedCard ¶
Click to show internal directories.
Click to hide internal directories.