kif

package module
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: BSD-2-Clause-Views Imports: 13 Imported by: 6

README

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EOS         = fmt.Errorf("EOS")
	ErrMismatch = fmt.Errorf("mismatch")
)

Functions

func Normalize

func Normalize(k *ptypes.Kif)

func PieceFromName

func PieceFromName(name string) ptypes.Piece_Id

func PrintElapsed

func PrintElapsed(sec int32) string

func PrintFinishedStatus

func PrintFinishedStatus(s ptypes.FinishedStatus_Id) string

func PrintModifier

func PrintModifier(m ptypes.Modifier_Id) string

func PrintMove

func PrintMove(s *ptypes.Step) string

func PrintPhase

func PrintPhase(s *ptypes.Step) string

func PrintPiece

func PrintPiece(p ptypes.Piece_Id) string

func PrintPos

func PrintPos(p *ptypes.Pos) string

func PrintThinking

func PrintThinking(sec int32) string

func SetEndTime

func SetEndTime(k *ptypes.Kif, t time.Time)

func SetStartTime

func SetStartTime(k *ptypes.Kif, t time.Time)

func StepToMove

func StepToMove(step *ptypes.Step) string

Types

type Format

type Format int
const (
	Format_KIF Format = iota
	Format_SFEN
)

type ParseOption

type ParseOption func(*Parser)

func ParseEncodingSJIS

func ParseEncodingSJIS() ParseOption

func ParseEncodingUTF8

func ParseEncodingUTF8() ParseOption

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser(ops ...ParseOption) *Parser

func (*Parser) Parse

func (p *Parser) Parse(in io.Reader) (*ptypes.Kif, error)

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(ops ...WriterOption) *Writer

func (*Writer) Write

func (w *Writer) Write(out io.Writer, kif *ptypes.Kif) error

type WriterOption

type WriterOption func(*Writer)

func SetDelimiter

func SetDelimiter(delimiter string) WriterOption

func SetFormat

func SetFormat(format Format) WriterOption

func WriteEncodingSJIS

func WriteEncodingSJIS() WriterOption

func WriteEncodingUTF8

func WriteEncodingUTF8() WriterOption

Directories

Path Synopsis
cmd
kif

Jump to

Keyboard shortcuts

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