Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteGame ¶
func ExecuteGame(whiteAgent, blackAgent PlayerInstance, config Config) api.GameResult
func Validate ¶
func Validate(pathToExecutable string, scheduler *PortScheduler) error
Types ¶
type PlayerInstance ¶
type PlayerProcessInstance ¶
type PlayerProcessInstance struct {
// contains filtered or unexported fields
}
PlayerProcessInstance is not thread-safe
func NewPlayerProcessInstance ¶
func NewPlayerProcessInstance(player api.Player, executable string, scheduler *PortScheduler) (*PlayerProcessInstance, error)
func (*PlayerProcessInstance) Close ¶
func (i *PlayerProcessInstance) Close() error
func (*PlayerProcessInstance) Player ¶
func (i *PlayerProcessInstance) Player() api.Player
type PortScheduler ¶
type PortScheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func NewScheduler(basePort, numPorts int) *PortScheduler
func (*PortScheduler) GetPort ¶
func (ps *PortScheduler) GetPort() (int, error)
func (*PortScheduler) ReleasePort ¶
func (ps *PortScheduler) ReleasePort(port int)
type RemotePlayerInstance ¶
func (*RemotePlayerInstance) Ping ¶
func (i *RemotePlayerInstance) Ping() error
func (*RemotePlayerInstance) Player ¶
func (i *RemotePlayerInstance) Player() api.Player
Click to show internal directories.
Click to hide internal directories.