stats

package
v0.10.52 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

type Feature struct {
	Name         string
	TotalBets    int64
	TotalWins    int64
	TriggerTimes int64
	OnAnalyze    FuncAnalyzeFeature
}

func NewFeature

func NewFeature(name string, onanalyze FuncAnalyzeFeature) *Feature

func (*Feature) OnResults

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

type FuncAnalyzeFeature

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

type IStats added in v0.10.51

type IStats interface {
	OnResults(stake *sgc7game.Stake, lst []*sgc7game.PlayResult)
}

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) OnScene

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

type Reels

type Reels struct {
	Reels []*Reel
}

func NewReels

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

func (*Reels) OnScene

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

type SymbolRTP

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

func NewSymbolRTP

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

func (*SymbolRTP) CalcRTP

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

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

type SymbolsRTP

type SymbolsRTP struct {
	MapSymbols map[mathtoolset.SymbolType]*SymbolRTP
	TotalBets  int64
}

func NewSymbolsRTP

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

func (*SymbolsRTP) OnBet added in v0.10.51

func (ssrtp *SymbolsRTP) OnBet(bet int64)

func (*SymbolsRTP) OnWin

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

Jump to

Keyboard shortcuts

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