Documentation ¶
Index ¶
- func CheckAllPlayers(g Game) bool
- func ClearGame(channelId string, c cache.Cache) error
- func ClearGestures(g Game)
- func FindTarget(g Game, selector string) (*wavinghands.Living, error)
- func GetCurrentPlayer(g Game, name string) (*wavinghands.Wizard, error)
- func PromptForGestures(g Game, event BotGame) error
- func SetChannelGame(channelId string, g WHGameData, c cache.Cache) error
- type BotGame
- type BotGameHelp
- type Game
- type GameData
- type Games
- type HelpResponse
- type Method
- type Response
- type TicTacToeGame
- type WHGameData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAllPlayers ¶
func ClearGestures ¶
func ClearGestures(g Game)
func FindTarget ¶
func FindTarget(g Game, selector string) (*wavinghands.Living, error)
func GetCurrentPlayer ¶
func GetCurrentPlayer(g Game, name string) (*wavinghands.Wizard, error)
func PromptForGestures ¶
func SetChannelGame ¶
func SetChannelGame(channelId string, g WHGameData, c cache.Cache) error
Types ¶
type BotGame ¶
type BotGameHelp ¶
type BotGameHelp struct{}
func (BotGameHelp) Ttt ¶
func (h BotGameHelp) Ttt(request BotGame) (response HelpResponse)
type Games ¶
type Games struct { Mm *mmclient.MMClient Settings *settings.Settings Cache cache.Cache GameTigger string // TODO: This should come from settings // contains filtered or unexported fields }
type HelpResponse ¶
type TicTacToeGame ¶
func NewTicTacToeGame ¶
func NewTicTacToeGame(event BotGame) (*TicTacToeGame, error)
func (*TicTacToeGame) CacheGameData ¶
func (tttg *TicTacToeGame) CacheGameData() error
func (*TicTacToeGame) DeleteGameData ¶
func (tttg *TicTacToeGame) DeleteGameData()
func (*TicTacToeGame) GetGameData ¶
func (tttg *TicTacToeGame) GetGameData() (GameData, bool, error)
func (*TicTacToeGame) PrintBoard ¶
func (tttg *TicTacToeGame) PrintBoard() string
func (*TicTacToeGame) PrintHelp ¶
func (tttg *TicTacToeGame) PrintHelp() string
type WHGameData ¶
type WHGameData struct { State string `json:"state"` Players []wavinghands.Wizard `json:"players"` Round int `json:"round"` }
func GetChannelGame ¶
func GetChannelGame(channelId string, c cache.Cache) (WHGameData, error)
Click to show internal directories.
Click to hide internal directories.