protocol

package
v0.0.0-...-1e1a600 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package protocol ... Text ui

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLIOptions

type CLIOptions struct {
	Engine         string
	Protocol       string
	Stats          bool
	Book           bool
	TT             bool
	ConsoleNoColor bool
	Fen            string
	Depth          int
	Difficulty     int    // several uses but for crazy chess 1-3
	GameType       string // normal eq empty string. or "crazy" etc
	NameVersion    string
	Debug          bool
	RBC            int
}

CLIOptions ... struct to hold command line options

type Console

type Console struct {
	In      io.Reader
	Out     io.Writer
	Stderr  io.Writer
	Options CLIOptions
}

Console ... provides a text ui to communicate to game engine with

func NewConsole

func NewConsole(in io.Reader, out io.Writer, stderr io.Writer, options CLIOptions) (*Console, error)

func (*Console) Echo

func (proto *Console) Echo() (e error)

func (*Console) MainLoop

func (proto *Console) MainLoop(myEngine *engine.Engine)

func (*Console) Start

func (proto *Console) Start() error

type EngineInfo

type EngineInfo struct {
	*hclibs.Statistics
	*hclibs.PV
}

EngineInfo ... datatype for messaging stats and game position info between componants

type Uci

type Uci struct {
	In      io.Reader
	Out     io.Writer
	Options CLIOptions
}

func NewUCI

func NewUCI(in io.Reader, out io.Writer, options CLIOptions) (*Uci, error)

func (*Uci) Echo

func (proto *Uci) Echo() (e error)

func (*Uci) Start

func (proto *Uci) Start() (e error)

type Xboard

type Xboard struct {
	In      io.Reader
	Out     io.Writer
	Options CLIOptions
}

func NewXboard

func NewXboard(in io.Reader, out io.Writer, options CLIOptions) (*Xboard, error)

func (*Xboard) Echo

func (proto *Xboard) Echo() (e error)

func (*Xboard) Start

func (proto *Xboard) Start() (e error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL