Documentation ¶
Index ¶
- func ParseChallengeRule(rule string) (pb.ChallengeRule, error)
- func ShowChallengeRule(rule pb.ChallengeRule) string
- type GameOptions
- type GameRunner
- func (g *GameRunner) IsPlaying() bool
- func (g *GameRunner) MoveFromEvent(evt *pb.GameEvent) (*move.Move, error)
- func (g *GameRunner) NewChallengeMove(playerid int) (*move.Move, error)
- func (g *GameRunner) NewExchangeMove(playerid int, letters string) (*move.Move, error)
- func (g *GameRunner) NewPassMove(playerid int) (*move.Move, error)
- func (g *GameRunner) NewPlacementMove(playerid int, coords string, word string) (*move.Move, error)
- func (g *GameRunner) ParseMove(playerid int, lowercase bool, fields []string) (*move.Move, error)
- func (g *GameRunner) SetCurrentRack(letters string) error
- func (g *GameRunner) SetPlayerRack(playerid int, letters string) error
- type Lexicon
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseChallengeRule ¶
func ParseChallengeRule(rule string) (pb.ChallengeRule, error)
func ShowChallengeRule ¶
func ShowChallengeRule(rule pb.ChallengeRule) string
Types ¶
type GameOptions ¶
type GameOptions struct { Lexicon *Lexicon ChallengeRule pb.ChallengeRule BoardLayoutName string Variant game.Variant }
func (*GameOptions) SetBoardLayoutName ¶
func (opts *GameOptions) SetBoardLayoutName(name string) error
func (*GameOptions) SetChallenge ¶
func (opts *GameOptions) SetChallenge(rule string) error
func (*GameOptions) SetDefaults ¶
func (opts *GameOptions) SetDefaults(config *config.Config)
func (*GameOptions) SetLexicon ¶
func (opts *GameOptions) SetLexicon(fields []string) error
func (*GameOptions) SetVariant ¶ added in v0.4.9
func (opts *GameOptions) SetVariant(name string) error
type GameRunner ¶
func NewGameRunnerFromRules ¶
func NewGameRunnerFromRules(opts *GameOptions, players []*pb.PlayerInfo, rules *game.GameRules) (*GameRunner, error)
NewGameRunnerFromRules is a good entry point
func (*GameRunner) IsPlaying ¶
func (g *GameRunner) IsPlaying() bool
func (*GameRunner) MoveFromEvent ¶
func (*GameRunner) NewChallengeMove ¶
func (g *GameRunner) NewChallengeMove(playerid int) (*move.Move, error)
func (*GameRunner) NewExchangeMove ¶
func (*GameRunner) NewPassMove ¶
func (g *GameRunner) NewPassMove(playerid int) (*move.Move, error)
func (*GameRunner) NewPlacementMove ¶
func (*GameRunner) SetCurrentRack ¶
func (g *GameRunner) SetCurrentRack(letters string) error
func (*GameRunner) SetPlayerRack ¶
func (g *GameRunner) SetPlayerRack(playerid int, letters string) error
Click to show internal directories.
Click to hide internal directories.