Documentation ¶
Overview ¶
Package uci implements encoding and decoding for Universal Chess Interface (UCI) messages.
Index ¶
- func Marshal(m Message) ([]byte, error)
- func Unmarshal(text []byte, m Message) error
- type BestMove
- type CopyProtection
- type Debug
- type Decoder
- type Encoder
- type Go
- type ID
- type Info
- type IsReady
- type Message
- type Option
- type PonderHit
- type Position
- type Quit
- type ReadyOk
- type Register
- type Registration
- type SetOption
- type Stop
- type UCI
- type UCINewGame
- type UCIOk
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BestMove ¶
BestMove represents the "bestmove" message.
func (*BestMove) MarshalText ¶
func (*BestMove) UnmarshalText ¶
type CopyProtection ¶
type CopyProtection struct{}
CopyProtection represents the "copyprotection" message.
func (*CopyProtection) MarshalText ¶
func (c *CopyProtection) MarshalText() ([]byte, error)
func (*CopyProtection) UnmarshalText ¶
func (c *CopyProtection) UnmarshalText(text []byte) error
type Debug ¶
type Debug struct {
Flag bool
}
Debug represents the "debug" message.
func (*Debug) MarshalText ¶
func (*Debug) UnmarshalText ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder decodes UCI messages from an input stream.
func NewDecoder ¶
NewDecoder returns a new decoder that reads from r.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder encodes UCI messages to an output stream.
func NewEncoder ¶
NewEncoder returns a new encoder that writes to w.
type Go ¶
type Go struct { SearchMoves []string // Restrict search to these moves only. Ignore if empty. Ponder bool // Search in pondering mode. Infinite bool // Search until interrupted. MoveTime int // If > 0, search for this many milliseconds. WhiteTime int // If > 0, white's remaining time in milliseconds. BlackTime int // If > 0, black's remaining time in milliseconds. WhiteIncrement int // If > 0, white's increment in milliseconds. BlackIncrement int // If > 0, black's increment in milliseconds. Depth int // If > 0, search this many plies only. Nodes int // If > 0, search this many nodes only. Mate int // If > 0, search for a mate in this many moves. MovesToGo int // If > 0, there are this many moves until the next time control. }
Go represents the "go" message.
func (*Go) MarshalText ¶
func (*Go) UnmarshalText ¶
type Info ¶
type Info struct{}
Info represents the "info" message.
func (*Info) MarshalText ¶
func (*Info) UnmarshalText ¶
type IsReady ¶
type IsReady struct{}
IsReady represents the "isready" message.
func (*IsReady) MarshalText ¶
func (*IsReady) UnmarshalText ¶
type Message ¶
type Message interface { encoding.TextMarshaler encoding.TextUnmarshaler }
Message is the interface implemented by all UCI messages.
type Option ¶
type Option struct{}
Option represents the "option" message.
func (*Option) MarshalText ¶
func (*Option) UnmarshalText ¶
type PonderHit ¶
type PonderHit struct{}
PonderHit represents the "ponderhit" message.
func (*PonderHit) MarshalText ¶
func (*PonderHit) UnmarshalText ¶
type Position ¶
Position represents the "position" message.
func (*Position) MarshalText ¶
func (*Position) UnmarshalText ¶
type Quit ¶
type Quit struct{}
Quit represents the "quit" message.
func (*Quit) MarshalText ¶
func (*Quit) UnmarshalText ¶
type ReadyOk ¶
type ReadyOk struct{}
ReadyOk represents the "readyok" message.
func (*ReadyOk) MarshalText ¶
func (*ReadyOk) UnmarshalText ¶
type Register ¶
Register represents the "register" message.
func (*Register) MarshalText ¶
func (*Register) UnmarshalText ¶
type Registration ¶
type Registration struct{}
Registration represents the "registration" message.
func (*Registration) MarshalText ¶
func (r *Registration) MarshalText() ([]byte, error)
func (*Registration) UnmarshalText ¶
func (r *Registration) UnmarshalText(text []byte) error
type SetOption ¶
SetOption represents the "setoption" message.
func (*SetOption) MarshalText ¶
func (*SetOption) UnmarshalText ¶
type Stop ¶
type Stop struct{}
Stop represents the "stop" message.
func (*Stop) MarshalText ¶
func (*Stop) UnmarshalText ¶
type UCI ¶
type UCI struct{}
UCI represents the "uci" message.
func (*UCI) MarshalText ¶
func (*UCI) UnmarshalText ¶
type UCINewGame ¶
type UCINewGame struct{}
UCINewGame represents the "ucinewgame" message.
func (*UCINewGame) MarshalText ¶
func (*UCINewGame) MarshalText() ([]byte, error)
func (*UCINewGame) UnmarshalText ¶
func (*UCINewGame) UnmarshalText(text []byte) error