Documentation ¶
Index ¶
- type History
- func (h *History) PushAction(op *protocol.OpTypeDo)
- func (h *History) PushGangScoreChange(g *protocol.GangPaiScoreChange) error
- func (h *History) PushHuScoreChange(hsc *protocol.HuInfo) error
- func (h *History) Save() error
- func (h *History) SetEndStats(ge *protocol.RoundOverStats) error
- func (h *History) SetScoreChangeForTurn(turn uint8, sc int) error
- type MatchStats
- type Record
- type RoundStats
- type SnapShot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type History ¶
type History struct { SnapShot // contains filtered or unexported fields }
func New ¶
func New(deskID int64, mode int, name0, name1, name2, name3 string, basic *protocol.DeskBasicInfo, enter *protocol.PlayerEnterDesk, duan *protocol.DuanPai) *History
func (*History) PushAction ¶
func (*History) PushGangScoreChange ¶
func (h *History) PushGangScoreChange(g *protocol.GangPaiScoreChange) error
func (*History) SetEndStats ¶
func (h *History) SetEndStats(ge *protocol.RoundOverStats) error
type MatchStats ¶
场统计
func (MatchStats) Push ¶
func (ps MatchStats) Push(rs RoundStats) error
func (MatchStats) Result ¶
func (ps MatchStats) Result() map[int64]*Record
func (MatchStats) Round ¶
func (ps MatchStats) Round() int
type SnapShot ¶
type SnapShot struct { Enter *protocol.PlayerEnterDesk `json:"enter"` BasicInfo *protocol.DeskBasicInfo `json:"basicInfo"` DuanPai *protocol.DuanPai `json:"duanPai"` End *protocol.RoundOverStats `json:"end"` // 如果在此遇到了gang操作就去GangScoreChanges中按序拿数据, // 如果遇到了hu就去HuScoreChanges中拿数据, // 即杠与和数据分开放 Do []*protocol.OpTypeDo `json:"do"` GangScoreChanges []*protocol.GangPaiScoreChange `json:"gangScoreChanges"` HuScoreChanges []*protocol.HuInfo `json:"huScoreChanges"` }
Click to show internal directories.
Click to hide internal directories.