Documentation
¶
Index ¶
- Constants
- func SaveExcel(fn string, lst []*Feature, onSave FuncOnSaveExcel) error
- type Feature
- func (feature *Feature) GetPlayTimes() int64
- func (feature *Feature) GetTotalBets() int64
- func (feature *Feature) OnFreeSpin()
- func (feature *Feature) OnResults(stake *sgc7game.Stake, lst []*sgc7game.PlayResult)
- func (feature *Feature) OnRound()
- func (feature *Feature) Retrigger()
- func (feature *Feature) SaveExcel(fn string) error
- type FeatureType
- type FuncAnalyzeFeature
- type FuncOnSaveExcel
- type IStats
- type Reel
- type Reels
- type SymbolRTP
- type SymbolStats
- type SymbolsRTP
Constants ¶
View Source
const ( FeatureBasic = 1 FeatureRespin = 2 FeatureFreeGame = 3 )
Variables ¶
This section is empty.
Functions ¶
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 Obj interface{} }
func NewFeature ¶
func NewFeature(name string, ft FeatureType, onAnalyze FuncAnalyzeFeature, parent *Feature) *Feature
func (*Feature) GetPlayTimes ¶
func (*Feature) GetTotalBets ¶
func (*Feature) OnFreeSpin ¶
func (feature *Feature) OnFreeSpin()
type FeatureType ¶
type FeatureType int
type FuncAnalyzeFeature ¶
type FuncAnalyzeFeature func(*Feature, *sgc7game.Stake, []*sgc7game.PlayResult) (bool, int64, int64)
isTrigger, bet, wins
type FuncOnSaveExcel ¶ added in v0.10.57
type FuncOnSaveExcel func(*excelize.File) error
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) CalcHitRate ¶
func (reel *Reel) CalcHitRate(s mathtoolset.SymbolType) float64
func (*Reel) GenSymbols ¶
func (reel *Reel) GenSymbols(symbols []mathtoolset.SymbolType) []mathtoolset.SymbolType
type Reels ¶
type Reels struct {
Reels []*Reel
}
func NewReels ¶
func NewReels(width int, lst []mathtoolset.SymbolType) *Reels
func (*Reels) GenSymbols ¶
func (reels *Reels) GenSymbols() []mathtoolset.SymbolType
type SymbolRTP ¶
type SymbolRTP struct { Symbol mathtoolset.SymbolType Wins []int64 }
func NewSymbolRTP ¶
func NewSymbolRTP(s mathtoolset.SymbolType, maxSymbolNum int) *SymbolRTP
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)
Click to show internal directories.
Click to hide internal directories.