sgc7rtp

package
v0.5.38 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RTPNodeRoot - root
	RTPNodeRoot = 0
	// RTPNodeGameMod - gamemod
	RTPNodeGameMod = 1
	// RTPNodeTag - tag
	RTPNodeTag = 2
	// RTPNodeSymbol - symbol
	RTPNodeSymbol = 3
	// RTPNodeSymbolNums - symbol nums
	RTPNodeSymbolNums = 4
)

Variables

This section is empty.

Functions

func InitGameMod

func InitGameMod(node *RTPNode, tags []string, funcTag []FuncOnResult, symbols []int, nums []int)

InitGameMod - new RTPNode

func InitGameModTag

func InitGameModTag(node *RTPNode, tag string, symbols []int, nums []int)

InitGameModTag - new RTPNode

func InitSymbol

func InitSymbol(node *RTPNode, tag string, symbol int, nums []int)

InitSymbol - new RTPNode

func OnGameModResult

func OnGameModResult(node *RTPNode, pr *sgc7game.PlayResult) bool

OnGameModResult - on gamemod

func OnRootResult

func OnRootResult(node *RTPNode, pr *sgc7game.PlayResult) bool

OnRootResult - on root

func OnSymbolNumsResult

func OnSymbolNumsResult(node *RTPNode, pr *sgc7game.PlayResult) bool

OnSymbolNumsResult - on symbol nums

func OnSymbolResult

func OnSymbolResult(node *RTPNode, pr *sgc7game.PlayResult) bool

OnSymbolResult - on symbol

func StartRTP

func StartRTP(game sgc7game.IGame, rtp *RTP, worknums int, spinnums int64, stake *sgc7game.Stake, numsTimer int, ontimer FuncOnRTPTimer) time.Duration

StartRTP - start RTP

Types

type FuncHROnResult

type FuncHROnResult func(node *HitRateNode, pr *sgc7game.PlayResult) bool

FuncHROnResult - onResult(*HitRateNode, *sgc7game.PlayResult)

type FuncOnRTPTimer

type FuncOnRTPTimer func(totalnums int64, curnums int64, curtime time.Duration)

FuncOnRTPTimer - on timer for rtp

type FuncOnResult

type FuncOnResult func(node *RTPNode, pr *sgc7game.PlayResult) bool

FuncOnResult - onResult(*RTPNode, *sgc7game.PlayResult)

type HitRateNode

type HitRateNode struct {
	TagName      string
	BetNums      int64
	TriggerNums  int64
	TotalNums    int64
	FuncOnResult FuncHROnResult
}

HitRateNode -

func NewSpecialHitRate

func NewSpecialHitRate(tag string, funcOnResult FuncHROnResult) *HitRateNode

NewSpecialHitRate - new HitRateNode

func (*HitRateNode) Add

func (node *HitRateNode) Add(node1 *HitRateNode)

Add - add

func (*HitRateNode) Clone

func (node *HitRateNode) Clone() *HitRateNode

Clone - clone

func (*HitRateNode) GenString

func (node *HitRateNode) GenString() string

GenString -

type RTP

type RTP struct {
	BetNums  int64
	TotalBet int64
	Root     *RTPNode
	MapHR    map[string]*HitRateNode
}

RTP -

func NewRTP

func NewRTP() *RTP

NewRTP - new RTP

func (*RTP) Add

func (rtp *RTP) Add(rtp1 *RTP)

Add - add

func (*RTP) AddHitRateNode

func (rtp *RTP) AddHitRateNode(tag string, funcOnResult FuncHROnResult)

AddHitRateNode -

func (*RTP) Bet

func (rtp *RTP) Bet(bet int64)

Bet -

func (*RTP) CalcRTP

func (rtp *RTP) CalcRTP()

CalcRTP -

func (*RTP) Clone

func (rtp *RTP) Clone() *RTP

Clone - clone

func (*RTP) OnResult

func (rtp *RTP) OnResult(pr *sgc7game.PlayResult)

OnResult -

func (*RTP) Save2CSV

func (rtp *RTP) Save2CSV(fn string) error

Save2CSV -

type RTPNode

type RTPNode struct {
	NodeType     int
	TriggerNums  int64
	TotalWin     int64
	RTP          float64
	MapChildren  map[string]*RTPNode
	GameMod      string
	Symbol       int
	SymbolNums   int
	TagName      string
	FuncOnResult FuncOnResult
}

RTPNode -

func NewRTPGameMod

func NewRTPGameMod(gamemod string) *RTPNode

NewRTPGameMod - new RTPNode

func NewRTPGameModTag

func NewRTPGameModTag(gamemod string, tag string, funcTag FuncOnResult) *RTPNode

NewRTPGameModTag - new RTPNode

func NewRTPRoot

func NewRTPRoot() *RTPNode

NewRTPRoot - new RTPNode

func NewRTPSymbol

func NewRTPSymbol(gamemod string, tag string, symbol int) *RTPNode

NewRTPSymbol - new RTPNode

func NewRTPSymbolNums

func NewRTPSymbolNums(gamemod string, tag string, symbol int, nums int) *RTPNode

NewRTPSymbolNums - new RTPNode

func (*RTPNode) Add

func (node *RTPNode) Add(node1 *RTPNode)

Add - add

func (*RTPNode) AddChild

func (node *RTPNode) AddChild(name string, c *RTPNode)

AddChild -

func (*RTPNode) CalcRTP

func (node *RTPNode) CalcRTP(totalbet int64)

CalcRTP -

func (*RTPNode) ChgSymbolNumsFunc

func (node *RTPNode) ChgSymbolNumsFunc(funcOnResult FuncOnResult)

ChgSymbolNumsFunc -

func (*RTPNode) Clone

func (node *RTPNode) Clone() *RTPNode

Clone - clone

func (*RTPNode) GenGameModString

func (node *RTPNode) GenGameModString(gamemod string, sn []int, totalbet int64) string

GenGameModString -

func (*RTPNode) GenRootString

func (node *RTPNode) GenRootString(sn []int, totalbet int64) string

GenRootString -

func (*RTPNode) GenSymbolString

func (node *RTPNode) GenSymbolString(gamemod string, tag string, symbol int, sn []int, totalbet int64) string

GenSymbolString -

func (*RTPNode) GenTagString

func (node *RTPNode) GenTagString(gamemod string, tag string, sn []int, totalbet int64) string

GenTagString -

func (*RTPNode) GetGameMods

func (node *RTPNode) GetGameMods(arr []string) []string

GetGameMods -

func (*RTPNode) GetSymbolNums

func (node *RTPNode) GetSymbolNums(arr []int) []int

GetSymbolNums -

func (*RTPNode) GetSymbolNumsWon

func (node *RTPNode) GetSymbolNumsWon(gamemod string, tag string, symbol int, sn int) int64

GetSymbolNumsWon -

func (*RTPNode) GetSymbols

func (node *RTPNode) GetSymbols(arr []int) []int

GetSymbols -

func (*RTPNode) GetTags

func (node *RTPNode) GetTags(arr []string, gamemod string) []string

GetTags -

func (*RTPNode) OnResult

func (node *RTPNode) OnResult(pr *sgc7game.PlayResult)

OnResult -

Jump to

Keyboard shortcuts

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