Documentation
¶
Index ¶
- type Clock
- type Control
- type ControlItem
- type ControlSide
- type Game
- func (g *Game) Clock() (Clock, bool)
- func (g *Game) CurBoard() *chess.Board
- func (g *Game) CurSide() chess.Color
- func (g *Game) Deadline() (time.Time, bool)
- func (g *Game) Finish(o chess.Outcome) error
- func (g *Game) HasTimer() bool
- func (g *Game) Inner() *chess.Game
- func (g *Game) IsFinished() bool
- func (g *Game) Outcome() chess.Outcome
- func (g *Game) Push(mv chess.Move) error
- func (g *Game) UCITimeSpec() (UCITimeSpec, bool)
- func (g *Game) UpdateTimer()
- type GameOptions
- type SimpleClock
- type Timer
- type TimerOptions
- type UCITimeSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Control ¶
type Control struct {
White ControlSide
Black ControlSide
}
func ControlFromString ¶
func (Control) MarshalJSON ¶ added in v0.9.1
func (*Control) UnmarshalJSON ¶ added in v0.9.1
type ControlItem ¶
func ControlItemFromString ¶
func ControlItemFromString(s string, isFinal bool) (ControlItem, error)
func (ControlItem) String ¶
func (c ControlItem) String() string
func (ControlItem) Validate ¶
func (c ControlItem) Validate(isFinal bool) error
type ControlSide ¶
type ControlSide []ControlItem
func ControlSideFromString ¶
func ControlSideFromString(s string) (ControlSide, error)
func (ControlSide) Clone ¶
func (c ControlSide) Clone() ControlSide
func (ControlSide) Eq ¶
func (c ControlSide) Eq(o ControlSide) bool
func (ControlSide) String ¶
func (c ControlSide) String() string
func (ControlSide) Validate ¶
func (c ControlSide) Validate() error
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
func (*Game) IsFinished ¶
func (*Game) UCITimeSpec ¶
func (g *Game) UCITimeSpec() (UCITimeSpec, bool)
func (*Game) UpdateTimer ¶
func (g *Game) UpdateTimer()
type GameOptions ¶
type GameOptions struct {
OutcomeFilter maybe.Maybe[chess.VerdictFilter]
Now func() time.Time
Clock maybe.Maybe[SimpleClock]
}
type SimpleClock ¶ added in v0.9.4
type Timer ¶
type Timer struct {
// contains filtered or unexported fields
}
func (*Timer) UCITimeSpec ¶
func (t *Timer) UCITimeSpec() UCITimeSpec
type TimerOptions ¶
Click to show internal directories.
Click to hide internal directories.