parser

package
v0.0.0-...-bd21981 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseAgari

func ParseAgari(node *Node) (result *tbase.Agari, err error)

func ParseRyuukyoku

func ParseRyuukyoku(node *Node) (r *tbase.Ryuukyoku, err error)

func ParseSeed

func ParseSeed(in string) (ret tbase.Seed, err error)

func SeedString

func SeedString(seed *tbase.Seed) string

Types

type Node

type Node struct {
	Name       string
	Attributes map[string]string
}

func (*Node) Check

func (node *Node) Check(key string) bool

func (*Node) Clone

func (node *Node) Clone() *Node

func (*Node) FloatList

func (node *Node) FloatList(name string) []tbase.Float

func (*Node) GetDealer

func (node *Node) GetDealer() tbase.Opponent

func (*Node) GetFinalScores

func (node *Node) GetFinalScores() tbase.FinalScoreChanges

func (*Node) GetHai

func (node *Node) GetHai(name string) tile.Instances

func (*Node) GetHaiNum

func (node *Node) GetHaiNum(id int) tile.Instances

func (*Node) GetHands

func (node *Node) GetHands() tbase.Hands

func (*Node) GetInit

func (node *Node) GetInit() (x tbase.Init, err error)

func (*Node) GetInstance

func (node *Node) GetInstance(name string) tile.Instance

func (*Node) GetMeld

func (node *Node) GetMeld() tbase.Meld

func (*Node) GetOpponent

func (node *Node) GetOpponent(key string) tbase.Opponent

func (*Node) GetScoreChanges

func (node *Node) GetScoreChanges() tbase.ScoreChanges

func (*Node) GetScores

func (node *Node) GetScores() tbase.Scores

func (*Node) GetScoresByName

func (node *Node) GetScoresByName(name string) tbase.Scores

func (*Node) GetTableStatus

func (node *Node) GetTableStatus() (status tbase.TableStatus, err error)

func (*Node) GetTiles

func (node *Node) GetTiles(name string) tile.Tiles

func (*Node) GetWho

func (node *Node) GetWho() tbase.Opponent

func (*Node) Int

func (node *Node) Int(name string) int

func (*Node) IntList

func (node *Node) IntList(name string) []int

func (*Node) IntPointer

func (node *Node) IntPointer(name string) *int

func (*Node) Keys

func (node *Node) Keys() []string

func (*Node) PString

func (node *Node) PString(name string) *string

func (*Node) String

func (node *Node) String(name string) string

func (*Node) StringList

func (node *Node) StringList(name string) []string

func (*Node) UnmarshalXML

func (node *Node) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

func (*Node) Unused

func (node *Node) Unused(name string)

func (*Node) ValidateUnused

func (node *Node) ValidateUnused() error

type NodeReader

type NodeReader struct {
	ReadCallback func(context.Context) (string, error)
	// contains filtered or unexported fields
}

func NewNodeReader

func NewNodeReader() *NodeReader

func (*NodeReader) Next

func (r *NodeReader) Next() (node *Node, err error)

func (*NodeReader) Start

func (r *NodeReader) Start(ctx context.Context) func()

type Nodes

type Nodes []Node

func ParseXML

func ParseXML(input string) (ret Nodes, err error)

type Root

type Root struct {
	XMLName xml.Name `xml:"mjloggm"`
	Nodes   Nodes    `xml:",any"`
}

Jump to

Keyboard shortcuts

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