stats

package
v0.12.252 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FeatureBasic    = 1
	FeatureRespin   = 2
	FeatureFreeGame = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

type Feature struct {
	Name                 string
	Type                 FeatureType
	PlayTimes            int64
	TotalBets            int64
	TotalWins            int64
	TriggerTimes         int64
	RetriggerTimes       int64
	FreeSpinTimes        int64
	RoundTimes           int64
	Parent               *Feature
	Children             []*Feature
	OnAnalyze            FuncAnalyzeFeature
	Reels                *Reels
	Symbols              *SymbolsRTP
	CurWins              *Wins
	AllWins              *Wins
	RespinEndingStatus   *Status
	RespinEndingName     string
	RespinStartStatus    *Status
	RespinStartName      string
	RespinStartStatusEx  *Status
	RespinStartNameEx    string
	RespinNumStatus      *Status
	RespinWinStatus      *Status
	RespinStartNumStatus *Status
	Obj                  any
}

func NewFeature

func NewFeature(name string, ft FeatureType, onAnalyze FuncAnalyzeFeature, parent *Feature) *Feature

func (*Feature) Clone

func (feature *Feature) Clone() *Feature

func (*Feature) CloneIncludeChildren

func (feature *Feature) CloneIncludeChildren() *Feature

func (*Feature) GetPlayTimes

func (feature *Feature) GetPlayTimes() int64

func (*Feature) GetTotalBets

func (feature *Feature) GetTotalBets() int64

func (*Feature) Merge

func (feature *Feature) Merge(src *Feature)

func (*Feature) OnFreeSpin

func (feature *Feature) OnFreeSpin()

func (*Feature) OnResults

func (feature *Feature) OnResults(stake *sgc7game.Stake, lst []*sgc7game.PlayResult)

func (*Feature) OnRound

func (feature *Feature) OnRound()

func (*Feature) Retrigger

func (feature *Feature) Retrigger()

func (*Feature) SaveExcel

func (feature *Feature) SaveExcel(fn string) error

type FeatureType

type FeatureType int

type FuncAnalyzeFeature

type FuncAnalyzeFeature func(*Feature, *sgc7game.Stake, []*sgc7game.PlayResult) (bool, int64, int64)

isTrigger, bet, wins

type Reel

type Reel struct {
	Index      int
	MapSymbols map[mathtoolset.SymbolType]*SymbolStats
	TotalTimes int64
}

func NewReel

func NewReel(i int, lst []mathtoolset.SymbolType) *Reel

func (*Reel) CalcHitRate

func (reel *Reel) CalcHitRate(s mathtoolset.SymbolType) float64

func (*Reel) Clone

func (reel *Reel) Clone() *Reel

func (*Reel) GenSymbols

func (reel *Reel) GenSymbols(symbols []mathtoolset.SymbolType) []mathtoolset.SymbolType

func (*Reel) Merge

func (reel *Reel) Merge(src *Reel)

func (*Reel) OnScene

func (reel *Reel) OnScene(scene *sgc7game.GameScene)

func (*Reel) OnSymbols

func (reel *Reel) OnSymbols(lst []mathtoolset.SymbolType)

type Reels

type Reels struct {
	Reels []*Reel
}

func NewReels

func NewReels(width int, lst []mathtoolset.SymbolType) *Reels

func (*Reels) Clone

func (reels *Reels) Clone() *Reels

func (*Reels) GenSymbols

func (reels *Reels) GenSymbols() []mathtoolset.SymbolType

func (*Reels) Merge

func (reels *Reels) Merge(src *Reels)

func (*Reels) OnReelSymbols

func (reels *Reels) OnReelSymbols(mapSyms map[int][]mathtoolset.SymbolType)

func (*Reels) OnScene

func (reels *Reels) OnScene(scene *sgc7game.GameScene)

func (*Reels) SaveSheet

func (reels *Reels) SaveSheet(f *excelize.File, sheet string) error

type Status added in v0.10.323

type Status struct {
	MapStatus  map[int]int64
	TotalTimes int64
}

func NewStatus added in v0.10.323

func NewStatus() *Status

func (*Status) AddStatus added in v0.10.323

func (status *Status) AddStatus(val int)

func (*Status) Clone added in v0.10.323

func (status *Status) Clone() *Status

func (*Status) Merge added in v0.10.323

func (status *Status) Merge(src *Status)

func (*Status) SaveSheet added in v0.10.323

func (status *Status) SaveSheet(f *excelize.File, sheet string) error

type SymbolRTP

type SymbolRTP struct {
	Symbol mathtoolset.SymbolType
	Wins   []int64
}

func NewSymbolRTP

func NewSymbolRTP(s mathtoolset.SymbolType, maxSymbolWinNum int) *SymbolRTP

func (*SymbolRTP) CalcRTP

func (srtp *SymbolRTP) CalcRTP(totalBets int64, num int) float64

func (*SymbolRTP) Clone

func (srtp *SymbolRTP) Clone() *SymbolRTP

func (*SymbolRTP) OnWin

func (srtp *SymbolRTP) OnWin(win *sgc7game.Result)

type SymbolStats

type SymbolStats struct {
	Symbol       mathtoolset.SymbolType
	TriggerTimes int64
}

func NewSymbolStats

func NewSymbolStats(s mathtoolset.SymbolType) *SymbolStats

func (*SymbolStats) CalcHitRate

func (ss *SymbolStats) CalcHitRate(totalTimes int64) float64

func (*SymbolStats) Clone

func (ss *SymbolStats) Clone() *SymbolStats

type SymbolsRTP

type SymbolsRTP struct {
	MapSymbols      map[mathtoolset.SymbolType]*SymbolRTP
	MaxSymbolWinNum int
}

func NewSymbolsRTP

func NewSymbolsRTP(maxSymbolWinNum int, lst []mathtoolset.SymbolType) *SymbolsRTP

func (*SymbolsRTP) Clone

func (ssrtp *SymbolsRTP) Clone() *SymbolsRTP

func (*SymbolsRTP) GenSymbols

func (ssrtp *SymbolsRTP) GenSymbols() []mathtoolset.SymbolType

func (*SymbolsRTP) Merge

func (ssrtp *SymbolsRTP) Merge(src *SymbolsRTP)

func (*SymbolsRTP) OnWin

func (ssrtp *SymbolsRTP) OnWin(win *sgc7game.Result)

func (*SymbolsRTP) SaveSheet

func (ssrtp *SymbolsRTP) SaveSheet(f *excelize.File, sheet string, totalBet int64) error

type Wins

type Wins struct {
	MapWins    map[int]int64
	TotalTimes int64
}

func NewWins

func NewWins() *Wins

func (*Wins) AddWin

func (wins *Wins) AddWin(win int)

func (*Wins) Clone

func (wins *Wins) Clone() *Wins

func (*Wins) Merge

func (wins *Wins) Merge(src *Wins)

func (*Wins) SaveSheet

func (wins *Wins) SaveSheet(f *excelize.File, sheet string) error

Jump to

Keyboard shortcuts

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