-
Notifications
You must be signed in to change notification settings - Fork 2
Game State
moxcomic edited this page Mar 17, 2024
·
25 revisions
A library that records all game information
github.com/moxcomic/Archer/gamestate
Always arrange in order of Self👇, Shimocha👉, Toimen👆, Kamicha👈
const (
RoundEndReasonHule = iota
RoundEndReasonRyuukyoku
)
type RoundEnd struct {
Reason int // round end reason
Deltas []int // round end score deltas, [0] is self
Hules []*Hules // hules data
}
type Hules struct {
Seat int // player seat, [0] is self
Tsumo bool // true is tsumo
Point int // ron & tsumo point
}
func Inst() *GameState
func (self *GameState) IsOnChiPon() bool
func (self *GameState) IsOnBabei() bool
func (self *GameState) IsRoundWind(tile string) bool
func (self *GameState) IsSelfWind(tile string) bool
func (self *GameState) IsCanWin() bool
func (self *GameState) IsLiqi3() bool
func (self *GameState) Chang() int
func (self *GameState) Ben() int
func (self *GameState) Ju() int
func (self *GameState) Oya() int
func (self *GameState) Score() []int32
func (self *GameState) DiscardTile() [][]string
func (self *GameState) Riichi() []bool
func (self *GameState) IsCan(int) bool
func (self *GameState) IsCanOperations() bool
func (self *GameState) IsOperation(uint32) bool
func (self *GameState) SetUserUseMouse(bool)
func (self *GameState) HandTile() []string
func (self *GameState) OperationCombination(uint32) []string
func (self *GameState) LeftTileCount() int
func (self *GameState) CanIppatsu() []bool
func (self *GameState) GlobalLeftTile() []string
func (self *GameState) RiichiAt() []int
func (self *GameState) Level() string
func (self *GameState) LevelScore() uint32
func (self *GameState) IsInSyncGame() bool
func (self *GameState) Melds() [][][]string
func (self *GameState) RoundEnd() *RoundEnd