Documentation ¶
Index ¶
Constants ¶
View Source
const ( SelfPlayer = 0 BotPlayer = 1 )
View Source
const (
StarPlayThreshold = 10.0 // equity
)
View Source
const WolgesTimeout = 15 * time.Second
Variables ¶
View Source
var (
ErrNeedSimmingBot = errors.New("need simming bot")
)
Functions ¶
func Main ¶
Main implements a NATS listener that takes data from a channel. It does not respond on a reply channel, because that implies the caller would need to block and wait for a response. Instead, we must send a bot move on a separate per-game-id channel when ready.
func MakeRequest ¶
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func NewBot ¶
func NewBot(cfg *mcfg.Config, options *turnplayer.GameOptions) *Bot
func (*Bot) Deserialize ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) RequestMove ¶
Send a game to the bot and get a move back.
type LambdaEvent ¶ added in v0.8.6
type ShellController ¶
type ShellController struct {
// contains filtered or unexported fields
}
func NewShellController ¶
func NewShellController(cfg *config.Config, execPath string) *ShellController
func (*ShellController) IsBotOnTurn ¶
func (sc *ShellController) IsBotOnTurn() bool
func (*ShellController) IsPlaying ¶
func (sc *ShellController) IsPlaying() bool
type ShellOptions ¶
type ShellOptions struct { turnplayer.GameOptions // contains filtered or unexported fields }
Options to configure the interactve shell
func NewShellOptions ¶
func NewShellOptions() *ShellOptions
func (*ShellOptions) ToDisplayText ¶
func (opts *ShellOptions) ToDisplayText() string
type WolgesAnalyzePayload ¶ added in v0.4.9
type WolgesAnalyzeResponse ¶ added in v0.4.9
Click to show internal directories.
Click to hide internal directories.