Documentation ¶
Index ¶
- Constants
- func DecodeLobby(in string) (res tbase.LobbyRules, err error)
- func ProcessXMLNode(node *parser.Node, c Controller) (err error)
- func ProcessXMLNodes(nodes parser.Nodes, c Controller) (err error)
- type AgariExtractor
- func (e *AgariExtractor) Agari(agari tbase.Agari)
- func (e *AgariExtractor) Close()
- func (e *AgariExtractor) Declare(params Declare)
- func (e *AgariExtractor) Discard(WithOpponentAndInstance)
- func (e *AgariExtractor) Init(params Init)
- func (e *AgariExtractor) Open(info Info) bool
- func (e *AgariExtractor) UserList(params client.UserList)
- type AgariReport
- type Controller
- type Declare
- type Info
- type Init
- type NullController
- func (NullController) Agari(tbase.Agari)
- func (NullController) Close()
- func (NullController) Declare(Declare)
- func (NullController) Discard(WithOpponentAndInstance)
- func (NullController) Disconnect(client.WithOpponent)
- func (NullController) Draw(WithOpponentAndInstance)
- func (NullController) Go(client.WithLobby)
- func (NullController) Indicator(client.WithInstance)
- func (NullController) Init(Init)
- func (NullController) Open(Info) bool
- func (NullController) Reach(client.Reach)
- func (NullController) Reconnect(client.Reconnect)
- func (NullController) Ryuukyoku(tbase.Ryuukyoku)
- func (NullController) Shuffle(Shuffle)
- func (NullController) Start(client.WithDealer)
- func (NullController) UserList(client.UserList)
- type Shuffle
- type WithOpponentAndInstance
- type XMLWriter
- func (w *XMLWriter) Agari(params tbase.Agari)
- func (w *XMLWriter) Close()
- func (w *XMLWriter) Declare(params Declare)
- func (w *XMLWriter) Discard(params WithOpponentAndInstance)
- func (w *XMLWriter) Disconnect(params client.WithOpponent)
- func (w *XMLWriter) Draw(params WithOpponentAndInstance)
- func (w *XMLWriter) Go(params client.WithLobby)
- func (w *XMLWriter) Init(params Init)
- func (w *XMLWriter) Open(Info) bool
- func (w *XMLWriter) Ryuukyoku(params tbase.Ryuukyoku)
- func (w *XMLWriter) Shuffle(params Shuffle)
- func (w *XMLWriter) Start(params client.WithDealer)
- func (w XMLWriter) UserList(params client.UserList)
Constants ¶
View Source
const ( LogUrlPrefix = "http://tenhou.net/0/?log=" XmlUrlPrefix = "https://tenhou.net/0/log/?" )
Variables ¶
This section is empty.
Functions ¶
func DecodeLobby ¶
func DecodeLobby(in string) (res tbase.LobbyRules, err error)
func ProcessXMLNode ¶
func ProcessXMLNode(node *parser.Node, c Controller) (err error)
func ProcessXMLNodes ¶
func ProcessXMLNodes(nodes parser.Nodes, c Controller) (err error)
Types ¶
type AgariExtractor ¶
type AgariExtractor struct { NullController Round int Dealer tbase.Opponent DoubleRon bool Info *Info KanFlag bool IsSanma bool Callback func(*Info, *tbase.Agari, *yaku.Context, base.Wind, score.Rules) // contains filtered or unexported fields }
func NewAgariExtractor ¶
func NewValidator ¶
func NewValidator(err *error) *AgariExtractor
func (*AgariExtractor) Agari ¶
func (e *AgariExtractor) Agari(agari tbase.Agari)
func (*AgariExtractor) Close ¶
func (e *AgariExtractor) Close()
func (*AgariExtractor) Declare ¶
func (e *AgariExtractor) Declare(params Declare)
func (*AgariExtractor) Discard ¶
func (e *AgariExtractor) Discard(WithOpponentAndInstance)
func (*AgariExtractor) Init ¶
func (e *AgariExtractor) Init(params Init)
func (*AgariExtractor) Open ¶
func (e *AgariExtractor) Open(info Info) bool
func (*AgariExtractor) UserList ¶
func (e *AgariExtractor) UserList(params client.UserList)
type AgariReport ¶
type AgariReport struct { Log *string `json:"id,omitempty"` Round int `json:"round"` Wind int `json:"wind"` Score score.Money `json:"score"` Tile tile.Instance `json:"tile"` Hand tile.Instances `json:"hand"` Melds tbase.Melds `json:"melds,omitempty"` DoraIndicators tile.Instances `json:"dora-indicators"` UraIndicators tile.Instances `json:"ura-indicators,omitempty"` Yaku tbase.Yakus `json:"yaku,omitempty"` Yakuman tbase.Yakumans `json:"yakuman,omitempty"` }
type Controller ¶
type Controller interface { // Should return false if not interested Open(Info) bool Close() Shuffle(Shuffle) Go(client.WithLobby) Start(client.WithDealer) Init(Init) Draw(WithOpponentAndInstance) Discard(WithOpponentAndInstance) Declare(Declare) Ryuukyoku(tbase.Ryuukyoku) Reach(client.Reach) Agari(tbase.Agari) Indicator(client.WithInstance) Disconnect(client.WithOpponent) client.UNController }
type Info ¶
type Info struct { Time time.Time Rules tbase.LobbyRules Lobby int Id string FixedId string FixedName string FullName string LogUrl string XmlUrl string }
func ParseLogInfo ¶
2009061806gm-00a1-0000-6d13c207 /2009/03/17/2009031702gm
func (*Info) DebugString ¶
type NullController ¶
type NullController struct{}
func (NullController) Agari ¶
func (NullController) Agari(tbase.Agari)
func (NullController) Close ¶
func (NullController) Close()
func (NullController) Declare ¶
func (NullController) Declare(Declare)
func (NullController) Discard ¶
func (NullController) Discard(WithOpponentAndInstance)
func (NullController) Disconnect ¶
func (NullController) Disconnect(client.WithOpponent)
func (NullController) Draw ¶
func (NullController) Draw(WithOpponentAndInstance)
func (NullController) Go ¶
func (NullController) Go(client.WithLobby)
func (NullController) Indicator ¶
func (NullController) Indicator(client.WithInstance)
func (NullController) Init ¶
func (NullController) Init(Init)
func (NullController) Open ¶
func (NullController) Open(Info) bool
func (NullController) Reach ¶
func (NullController) Reach(client.Reach)
func (NullController) Reconnect ¶
func (NullController) Reconnect(client.Reconnect)
func (NullController) Ryuukyoku ¶
func (NullController) Ryuukyoku(tbase.Ryuukyoku)
func (NullController) Shuffle ¶
func (NullController) Shuffle(Shuffle)
func (NullController) Start ¶
func (NullController) Start(client.WithDealer)
func (NullController) UserList ¶
func (NullController) UserList(client.UserList)
type WithOpponentAndInstance ¶
type WithOpponentAndInstance struct { client.WithOpponent client.WithInstance }
type XMLWriter ¶
func (*XMLWriter) Discard ¶
func (w *XMLWriter) Discard(params WithOpponentAndInstance)
func (*XMLWriter) Disconnect ¶
func (w *XMLWriter) Disconnect(params client.WithOpponent)
func (*XMLWriter) Draw ¶
func (w *XMLWriter) Draw(params WithOpponentAndInstance)
func (*XMLWriter) Start ¶
func (w *XMLWriter) Start(params client.WithDealer)
Click to show internal directories.
Click to hide internal directories.