history

package
v0.0.0-...-19a34af Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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, name4 string, basic *protocol.DeskBasicInfo, enter *protocol.PlayerEnterDesk, roll *protocol.Roll) *History

func (*History) Save

func (h *History) Save() error

func (*History) SetEndStats

func (h *History) SetEndStats(ge *protocol.RoundOverStats) error

func (*History) SetScoreChangeForTurn

func (h *History) SetScoreChangeForTurn(turn uint8, sc int) error

type MatchStats

type MatchStats map[int64][]*Record

func (MatchStats) Result

func (ps MatchStats) Result() map[int64]*Record

type Record

type Record struct {
	TotalScore int `json:"totalScore"`
}

type SnapShot

type SnapShot struct {
	Enter     *protocol.PlayerEnterDesk `json:"enter"`
	BasicInfo *protocol.DeskBasicInfo   `json:"basicInfo"`
	Roll      *protocol.Roll            `json:"roll"`
	End       *protocol.RoundOverStats  `json:"end"`

	OpenScoreChanges []*protocol.OpenInfo `json:"openScoreChanges"`
}

Jump to

Keyboard shortcuts

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