gtp

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: MIT Imports: 6 Imported by: 0

README

Go Text Protocol

This package holds an engine that implements part of the Go Text Protocol.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StandardLib

func StandardLib() map[string]Command

Types

type Command

type Command interface {
	Do(id int, args []string, e *Engine) (int, string, error)
}

type Engine

type Engine struct {
	Generate func(g game.State) game.PlayerMove
	New      func(m, n int) game.State
	// contains filtered or unexported fields
}

func New

func New(g game.State, name, version string, known map[string]Command) *Engine

func (*Engine) Start

func (e *Engine) Start() (input, output chan string)

func (*Engine) State

func (e *Engine) State() game.State

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳