Documentation
¶
Index ¶
- Variables
- func AbsInt(v0, v1 int) int
- func CountSymbolInReel(symbol SymbolType, reel []int, stop int, height int) int
- func GenReels(reader io.Reader, strExRule string) ([][]string, error)
- func GenStackReels(reader io.Reader, stack []int, excludeSymbol []string) ([][]string, error)
- func List2IntSlice(val ref.Val) []int
- func List2StrSlice(val ref.Val) []string
- func LoadReels(reader io.Reader) ([][]string, error)
- func MergeReels(readers []io.Reader) ([][]string, error)
- func NewExcelFile(reels [][]string) *excelize.File
- func SaveReels(fn string, reels [][]string) error
- type Client
- type ExRule
- type FileDataMap
- type ReelStats2
- type ReelsStats2
- type ScriptCore
- type Serv
- type SymbolData
- type SymbolType
- type SymbolsPool
- func (pool *SymbolsPool) Clone() *SymbolsPool
- func (pool *SymbolsPool) CountAllSymbolNumber() int
- func (pool *SymbolsPool) CountSymbolDataNumber(symbol string) int
- func (pool *SymbolsPool) Push(symbol string, num int)
- func (pool *SymbolsPool) PushEx(symbol string, symbolNum int, num int)
- func (pool *SymbolsPool) Remove(symbol string, symbolNum int)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnkonow - unknow error ErrUnkonow = errors.New("unknow error") // ErrInvalidReel - invalid reel ErrInvalidReel = errors.New("invalid reel") // ErrInvalidInReelSymbolType - invalid InReelSymbolType ErrInvalidInReelSymbolType = errors.New("invalid InReelSymbolType") // ErrInvalidReelsStatsExcelFile - invalid ReelsStats excel file ErrInvalidReelsStatsExcelFile = errors.New("invalid ReelsStats excel file") // ErrInvalidReelsStatsExcelColname - invalid ReelsStats excel colname ErrInvalidReelsStatsExcelColname = errors.New("invalid ReelsStats excel colname") // ErrNoValidSymbols - no valid symbols ErrNoValidSymbols = errors.New("no valid symbols") // ErrValidParamInAutoChgWeights - invalid param in AutoChgWeights ErrValidParamInAutoChgWeights = errors.New("invalid param in AutoChgWeights") // ErrInvalidDataInAGRDataList - invalid data in agrDataList ErrInvalidDataInAGRDataList = errors.New("invalid data in agrDataList") // ErrNoResultInAutoChgWeights - no result in AutoChgWeights ErrNoResultInAutoChgWeights = errors.New("no result in AutoChgWeights") // ErrInvalidReelsWithMinOff - invalid reels with minoff ErrInvalidReelsWithMinOff = errors.New("invalid reels with minoff") // ErrInvalidCode - invalid code ErrInvalidCode = errors.New("invalid code") // ErrInvalidFunctionParams - invalid function params ErrInvalidFunctionParams = errors.New("invalid function params") // ErrInvalidTargetRTP - invalid targetRTP ErrInvalidTargetRTP = errors.New("invalid targetRTP") // ErrUnimplementedCode - unimplemented code ErrUnimplementedCode = errors.New("unimplemented code") // ErrInvalidScatterNumber - invalid scatter number ErrInvalidScatterNumber = errors.New("invalid scatter number") // ErrCannotBeConverged - cannot be converged ErrCannotBeConverged = errors.New("cannot be converged") // ErrWinWeightMerge - WinWeight.Merge error ErrWinWeightMerge = errors.New("WinWeight.Merge error") // ErrWinWeightScale - WinWeight.scale error ErrWinWeightScale = errors.New("WinWeight.scale error") // ErrDuplicateAvgWin - duplicate avgwin ErrDuplicateAvgWin = errors.New("duplicate avgwin") // ErrInvalidReelsStats2File - invalid reelsstats2 file ErrInvalidReelsStats2File = errors.New("invalid reelsstats2 file") // ErrGenStackReel - genStackReel error ErrGenStackReel = errors.New("genStackReel error") // ErrReturnNotOK - ErrReturnNotOK = errors.New("return not ok") // ErrRunError - ErrRunError = errors.New("run error") // ErrInvalidFileData - invalid filedata ErrInvalidFileData = errors.New("invalid filedata") )
Functions ¶
func CountSymbolInReel ¶
func CountSymbolInReel(symbol SymbolType, reel []int, stop int, height int) int
CountSymbolInReel - count symbol number in reel,[stop, stop + height)
func GenStackReels ¶
func List2IntSlice ¶
func List2StrSlice ¶
func NewExcelFile ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client - MathToolsetClient
type ExRule ¶ added in v0.13.570
func ParseExRule ¶ added in v0.13.570
ParseExRule - code is like "SEP_3,SC,WL"
func ParseExRules ¶ added in v0.13.570
ParseExRules - code is like "OFF_3,SC,WL;OFF_5,H1,H2;"
func (*ExRule) IsFeasible ¶ added in v0.13.575
func (rule *ExRule) IsFeasible(pool *SymbolsPool, rd []string) bool
IsFeasible - 判断当前pool和rd是否理论上有解(支持SEP和EXC规则)
type FileDataMap ¶
func NewFileDataMap ¶
func NewFileDataMap(fd string) (*FileDataMap, error)
func (*FileDataMap) ToJson ¶
func (mapfd *FileDataMap) ToJson() (string, error)
type ReelStats2 ¶
type ReelsStats2 ¶
type ReelsStats2 struct {
Reels []*ReelStats2
Symbols []string
}
func BuildReelsStats2 ¶ added in v0.13.701
func BuildReelsStats2(reels [][]string) (*ReelsStats2, error)
BuildReelsStats2 builds ReelsStats2 from raw reels data (each reel is []string)
func LoadReelsStats2 ¶
func LoadReelsStats2(reader io.Reader) (*ReelsStats2, error)
func NewReelsStats2 ¶
func NewReelsStats2(reelnum int) *ReelsStats2
func (*ReelsStats2) SaveExcel ¶ added in v0.13.701
func (rss2 *ReelsStats2) SaveExcel(fn string) error
type ScriptCore ¶
type ScriptCore struct {
Cel *cel.Env
FileData string
MapFiles *FileDataMap
ErrInRun []error
MapOutputFiles *FileDataMap
}
func NewScriptCore ¶
func NewScriptCore(fileData string) (*ScriptCore, error)
func (*ScriptCore) Run ¶
func (sc *ScriptCore) Run(code string) error
type Serv ¶
type Serv struct {
sgc7pb.UnimplementedMathToolsetServer
// contains filtered or unexported fields
}
Serv - Service
type SymbolData ¶ added in v0.13.570
func BuildCurSymbols ¶ added in v0.13.570
func BuildCurSymbols(rd []string, rules []*ExRule, pool *SymbolsPool) []*SymbolData
func (*SymbolData) String ¶ added in v0.13.570
func (sd *SymbolData) String() string
type SymbolType ¶
type SymbolType int
func GetSymbols ¶
func GetSymbols(arr []string, paytables *sgc7game.PayTables) []SymbolType
type SymbolsPool ¶ added in v0.13.570
type SymbolsPool struct {
Pool []*SymbolData
}
func (*SymbolsPool) Clone ¶ added in v0.13.570
func (pool *SymbolsPool) Clone() *SymbolsPool
func (*SymbolsPool) CountAllSymbolNumber ¶ added in v0.13.570
func (pool *SymbolsPool) CountAllSymbolNumber() int
func (*SymbolsPool) CountSymbolDataNumber ¶ added in v0.13.570
func (pool *SymbolsPool) CountSymbolDataNumber(symbol string) int
func (*SymbolsPool) Push ¶ added in v0.13.570
func (pool *SymbolsPool) Push(symbol string, num int)
func (*SymbolsPool) PushEx ¶ added in v0.13.570
func (pool *SymbolsPool) PushEx(symbol string, symbolNum int, num int)
func (*SymbolsPool) Remove ¶ added in v0.13.570
func (pool *SymbolsPool) Remove(symbol string, symbolNum int)
Click to show internal directories.
Click to hide internal directories.