Documentation ¶
Index ¶
- func PrintWinCount(games []Game)
- type AutoGame
- type Game
- type InteractiveGame
- func (g *InteractiveGame) AskQuestion(player Player, code []int, verifierIndex int) bool
- func (g *InteractiveGame) GetVerifierCards() []*verifiers.VerifierCard
- func (g *InteractiveGame) MakeGuess(player Player, code []int) bool
- func (g *InteractiveGame) Rank() [][]Player
- func (g *InteractiveGame) Stats() map[Player]*PlayerMoves
- func (g *InteractiveGame) String() string
- type Player
- type PlayerMoves
- type Question
- type RemoteGame
- func (g *RemoteGame) AskQuestion(player Player, code []int, verifier int) bool
- func (g *RemoteGame) GetVerifierCards() []*verifiers.VerifierCard
- func (g *RemoteGame) MakeGuess(player Player, code []int) bool
- func (g *RemoteGame) Rank() [][]Player
- func (g *RemoteGame) Stats() map[Player]*PlayerMoves
- func (g *RemoteGame) String() string
- type Solution
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintWinCount ¶
func PrintWinCount(games []Game)
Types ¶
type AutoGame ¶
type AutoGame struct {
// contains filtered or unexported fields
}
func NewAutoGame ¶
func (*AutoGame) AskQuestion ¶
func (*AutoGame) GetVerifierCards ¶
func (g *AutoGame) GetVerifierCards() []*verifiers.VerifierCard
type Game ¶
type Game interface { fmt.Stringer GetVerifierCards() []*verifiers.VerifierCard AskQuestion(player Player, code []int, verifier int) bool MakeGuess(player Player, code []int) bool // Rank returns the players in order of their performance. Ties go into the same slice Rank() [][]Player }
func NewInteractiveGame ¶
func NewInteractiveGame(cards []*verifiers.VerifierCard) Game
type InteractiveGame ¶
type InteractiveGame struct {
// contains filtered or unexported fields
}
func (*InteractiveGame) AskQuestion ¶
func (g *InteractiveGame) AskQuestion(player Player, code []int, verifierIndex int) bool
func (*InteractiveGame) GetVerifierCards ¶
func (g *InteractiveGame) GetVerifierCards() []*verifiers.VerifierCard
func (*InteractiveGame) MakeGuess ¶
func (g *InteractiveGame) MakeGuess(player Player, code []int) bool
func (*InteractiveGame) Rank ¶
func (g *InteractiveGame) Rank() [][]Player
func (*InteractiveGame) Stats ¶
func (g *InteractiveGame) Stats() map[Player]*PlayerMoves
func (*InteractiveGame) String ¶
func (g *InteractiveGame) String() string
type Player ¶
type Player interface { // GetPlayerName returns the name of the player GetPlayerName() string }
type PlayerMoves ¶
type PlayerMoves struct {
// contains filtered or unexported fields
}
type Question ¶
type Question struct { Code []int Card *verifiers.VerifierCard }
type RemoteGame ¶
type RemoteGame struct {
// contains filtered or unexported fields
}
func (*RemoteGame) AskQuestion ¶
func (g *RemoteGame) AskQuestion(player Player, code []int, verifier int) bool
func (*RemoteGame) GetVerifierCards ¶
func (g *RemoteGame) GetVerifierCards() []*verifiers.VerifierCard
func (*RemoteGame) Rank ¶
func (g *RemoteGame) Rank() [][]Player
func (*RemoteGame) Stats ¶
func (g *RemoteGame) Stats() map[Player]*PlayerMoves
func (*RemoteGame) String ¶
func (g *RemoteGame) String() string
Click to show internal directories.
Click to hide internal directories.