lowcode

package
v0.10.176 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WinTypeLines        = "lines"
	WinTypeWays         = "ways"
	WinTypeScatters     = "scatters"
	WinTypeCountScatter = "countscatter"

	BetTypeNormal   = "bet"
	BetTypeTotalBet = "totalBet"
)
View Source
const (
	LightningTypeVal = "val"
	LightningTypeMul = "mul"

	LightningFeatureCollector = "collector"
)
View Source
const (
	GamePropWidth        = 1
	GamePropHeight       = 2
	GamePropCurPaytables = 3
	GamePropCurReels     = 4
	GamePropCurLineData  = 5

	GamePropTriggerFG = 100
	GamePropFGNum     = 101

	GamePropNextComponent   = 200
	GamePropRespinComponent = 201

	GamePropCurMystery = 1000
)

Variables

View Source
var (
	// ErrUnkonow - unknow error
	ErrUnkonow = errors.New("unknow error")

	// ErrMustHaveMainPaytables - must have main paytables
	ErrMustHaveMainPaytables = errors.New("must have main paytables")

	// ErrInvalidGameMod - invalid gamemod
	ErrInvalidGameMod = errors.New("invalid gamemod")

	// ErrInvalidComponent - invalid component
	ErrInvalidComponent = errors.New("invalid component")

	// ErrInvalidReels - invalid reels
	ErrInvalidReels = errors.New("invalid reels")

	// ErrInvalidSymbol - invalid symbol
	ErrInvalidSymbol = errors.New("invalid symbol")

	// ErrInvalidPaytables - invalid paytables
	ErrInvalidPaytables = errors.New("invalid paytables")

	// ErrInvalidGamePropertyString - invalid gameProperty string
	ErrInvalidGamePropertyString = errors.New("invalid gameProperty string")

	// ErrParseScript - parse script error
	ErrParseScript = errors.New("parse script error")
	// ErrNoFunctionInScript - no function in script
	ErrNoFunctionInScript = errors.New("no function in script")
	// ErrWrongFunctionInScript - wrong function in script
	ErrWrongFunctionInScript = errors.New("wrong function in script")

	// ErrIvalidComponentName - invalid component name
	ErrIvalidComponentName = errors.New("invalid component name")

	// ErrIvalidCurGameModParams - invalid CurGameModParams
	ErrIvalidCurGameModParams = errors.New("invalid CurGameModParams")

	// ErrIvalidPlayResultLength - invalid PlayResult Length
	ErrIvalidPlayResultLength = errors.New("invalid PlayResult Length")

	// ErrIvalidMultiLevelReelsConfig - invalid MultiLevelReels config
	ErrIvalidMultiLevelReelsConfig = errors.New("invalid MultiLevelReels config")

	// ErrIvalidStatsSymbolsInConfig - invalid StatsSymbols in config
	ErrIvalidStatsSymbolsInConfig = errors.New("invalid StatsSymbols in config")
	// ErrIvalidStatsComponentInConfig - invalid Stats's component in config
	ErrIvalidStatsComponentInConfig = errors.New("invalid Stats's component in config")
)
View Source
var MapProperty map[string]int

Functions

func GetBet

func GetBet(stake *sgc7game.Stake, bettype string) int

func NewStats

func NewStats(parent *sgc7stats.Feature, name string, onAnalyze sgc7stats.FuncAnalyzeFeature, width int, symbols []mathtoolset.SymbolType) *sgc7stats.Feature

func StartRTP

func StartRTP(gamecfg string, icore int, ispinnums int64, outputPath string) error

func String2Property

func String2Property(str string) (int, error)

Types

type BasicComponent

type BasicComponent struct {
	Config                *BasicComponentConfig
	Name                  string
	UsedScenes            []int
	UsedOtherScenes       []int
	UsedResults           []int
	UsedPrizeScenes       []int
	CashWin               int64
	CoinWin               int
	TargetSceneIndex      int
	TargetOtherSceneIndex int
	RNG                   []int
}

func NewBasicComponent

func NewBasicComponent(name string) *BasicComponent

func (*BasicComponent) AddOtherScene

func (basicComponent *BasicComponent) AddOtherScene(gameProp *GameProperty, curpr *sgc7game.PlayResult,
	sc *sgc7game.GameScene)

AddScene -

func (*BasicComponent) AddRNG

func (basicComponent *BasicComponent) AddRNG(gameProp *GameProperty, rng int)

AddRNG -

func (*BasicComponent) AddResult

func (basicComponent *BasicComponent) AddResult(curpr *sgc7game.PlayResult, ret *sgc7game.Result)

AddResult -

func (*BasicComponent) AddScene

func (basicComponent *BasicComponent) AddScene(gameProp *GameProperty, curpr *sgc7game.PlayResult,
	sc *sgc7game.GameScene)

AddScene -

func (*BasicComponent) BuildPBComponent added in v0.10.148

func (basicComponent *BasicComponent) BuildPBComponent(gp *GameParams)

BuildPBComponent -

func (*BasicComponent) GetTargetOtherScene

func (basicComponent *BasicComponent) GetTargetOtherScene(gameProp *GameProperty, curpr *sgc7game.PlayResult) *sgc7game.GameScene

GetTargetOtherScene -

func (*BasicComponent) GetTargetScene

func (basicComponent *BasicComponent) GetTargetScene(gameProp *GameProperty, curpr *sgc7game.PlayResult) *sgc7game.GameScene

GetTargetScene -

func (*BasicComponent) OnNewStep

func (basicComponent *BasicComponent) OnNewStep()

OnNewStep -

func (*BasicComponent) OnStatsWithComponent added in v0.10.148

func (basicComponent *BasicComponent) OnStatsWithComponent(feature *sgc7stats.Feature, pbComponent *sgc7pb.ComponentData, pr *sgc7game.PlayResult) int64

BuildPBComponent -

type BasicComponentConfig

type BasicComponentConfig struct {
	DefaultNextComponent     string   `yaml:"defaultNextComponent"`     // next component, if it is empty jump to ending
	DefaultFGRespinComponent string   `yaml:"defaultFGRespinComponent"` // respin component, if it is not empty and in FG
	TagScenes                []string `yaml:"tagScenes"`                // tag scenes
	TagOtherScenes           []string `yaml:"tagOtherScenes"`           // tag otherScenes
	TargetScene              string   `yaml:"targetScene"`              // target scenes
	TargetOtherScene         string   `yaml:"targetOtherScene"`         // target otherscenes
	TagRNG                   []string `yaml:"tagRNG"`                   // tag RNG
}

type BasicGameMod

type BasicGameMod struct {
	*sgc7game.BasicGameMod
	GameProp          *GameProperty
	Components        *ComponentList
	HistoryComponents []IComponent
}

BasicGameMod - basic gamemod

func NewBasicGameMod

func NewBasicGameMod(gameProp *GameProperty, cfgGameMod *GameModConfig, mgrComponent *ComponentMgr) *BasicGameMod

NewBasicGameMod - new BaseGame

func (*BasicGameMod) OnAsciiGame

func (bgm *BasicGameMod) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult) error

OnAsciiGame - outpur to asciigame

func (*BasicGameMod) OnNewGame

func (bgm *BasicGameMod) OnNewGame() error

OnNewGame -

func (*BasicGameMod) OnNewStep

func (bgm *BasicGameMod) OnNewStep() error

OnNewStep -

func (*BasicGameMod) OnPlay

func (bgm *BasicGameMod) OnPlay(game sgc7game.IGame, plugin sgc7plugin.IPlugin, cmd string, param string,
	ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) (*sgc7game.PlayResult, error)

OnPlay - on play

func (*BasicGameMod) ResetConfig

func (bgm *BasicGameMod) ResetConfig(cfg *Config)

ResetConfig

type BasicReels

type BasicReels struct {
	*BasicComponent
	Config         *BasicReelsConfig
	ReelSetWeights *sgc7game.ValWeights2
}

func (*BasicReels) Init

func (basicReels *BasicReels) Init(fn string, gameProp *GameProperty) error

Init -

func (*BasicReels) OnAsciiGame

func (basicReels *BasicReels) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*BasicReels) OnNewGame added in v0.10.142

func (basicReels *BasicReels) OnNewGame(gameProp *GameProperty) error

OnNewGame -

func (*BasicReels) OnNewStep added in v0.10.142

func (basicReels *BasicReels) OnNewStep(gameProp *GameProperty) error

OnNewStep -

func (*BasicReels) OnPlayGame

func (basicReels *BasicReels) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*BasicReels) OnStats

func (basicReels *BasicReels) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type BasicReelsConfig

type BasicReelsConfig struct {
	BasicComponentConfig `yaml:",inline"`
	ReelSetsWeight       string `yaml:"reelSetWeight"`
	ReelSet              string `yaml:"reelSet"`
	IsFGMainSpin         bool   `yaml:"isFGMainSpin"`
}

BasicReelsConfig - configuration for BasicReels

type BasicWins

type BasicWins struct {
	*BasicComponent
	Config         *BasicWinsConfig
	ExcludeSymbols []int
	WildSymbols    []int
}

func (*BasicWins) Init

func (basicWins *BasicWins) Init(fn string, gameProp *GameProperty) error

Init -

func (*BasicWins) OnAsciiGame

func (basicWins *BasicWins) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*BasicWins) OnNewGame added in v0.10.142

func (basicWins *BasicWins) OnNewGame(gameProp *GameProperty) error

OnNewGame -

func (*BasicWins) OnNewStep added in v0.10.142

func (basicWins *BasicWins) OnNewStep(gameProp *GameProperty) error

OnNewStep -

func (*BasicWins) OnPlayGame

func (basicWins *BasicWins) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*BasicWins) OnStats

func (basicWins *BasicWins) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*BasicWins) ProcTriggerFeature

func (basicWins *BasicWins) ProcTriggerFeature(tf *TriggerFeatureConfig, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult)

AddResult -

type BasicWinsConfig

type BasicWinsConfig struct {
	BasicComponentConfig `yaml:",inline"`
	MainType             string                  `yaml:"mainType"`       // lines or ways
	BetType              string                  `yaml:"betType"`        // bet or totalBet
	ExcludeSymbols       []string                `yaml:"excludeSymbols"` // w/s etc
	WildSymbols          []string                `yaml:"wildSymbols"`    // wild etc
	BeforMain            []*TriggerFeatureConfig `yaml:"beforMain"`      // befor the maintype
	AfterMain            []*TriggerFeatureConfig `yaml:"afterMain"`      // after the maintype
}

BasicWinsConfig - configuration for BasicWins

type BookOf

type BookOf struct {
	*BasicComponent
	Config          *BookOfConfig
	Symbols         []int
	WeightTrigger   *sgc7game.ValWeights2
	WeightSymbolNum *sgc7game.ValWeights2
	WeightSymbol    *sgc7game.ValWeights2
}

func (*BookOf) Init

func (bookof *BookOf) Init(fn string, gameProp *GameProperty) error

Init -

func (*BookOf) OnAsciiGame

func (bookof *BookOf) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*BookOf) OnNewGame added in v0.10.159

func (bookof *BookOf) OnNewGame(gameProp *GameProperty) error

OnNewGame -

func (*BookOf) OnNewStep added in v0.10.159

func (bookof *BookOf) OnNewStep(gameProp *GameProperty) error

OnNewStep -

func (*BookOf) OnPlayGame

func (bookof *BookOf) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*BookOf) OnStats

func (bookof *BookOf) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type BookOfConfig

type BookOfConfig struct {
	BasicComponentConfig `yaml:",inline"`
	BetType              string `yaml:"betType"` // bet or totalBet
	ForceTrigger         bool   `yaml:"forceTrigger"`
	WeightTrigger        string `yaml:"weightTrigger"`
	WeightSymbolNum      string `yaml:"weightSymbolNum"`
	WeightSymbol         string `yaml:"weightSymbol"`
	ForceSymbolNum       int    `yaml:"forceSymbolNum"`
	SymbolRNG            string `yaml:"symbolRNG"` // 只在ForceSymbolNum为1时有效
}

BookOfConfig - configuration for BookOf feature

type Collecotr added in v0.10.142

type Collecotr struct {
	*BasicComponent
	Config       *CollecotrConfig
	Val          int // 当前总值, Current total value
	NewCollector int // 这一个step收集到的, The values collected in this step
}

func (*Collecotr) Init added in v0.10.142

func (collector *Collecotr) Init(fn string, gameProp *GameProperty) error

Init -

func (*Collecotr) OnAsciiGame added in v0.10.142

func (collector *Collecotr) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*Collecotr) OnNewGame added in v0.10.142

func (collector *Collecotr) OnNewGame(gameProp *GameProperty) error

OnNewGame -

func (*Collecotr) OnNewStep added in v0.10.142

func (collector *Collecotr) OnNewStep(gameProp *GameProperty) error

OnNewStep -

func (*Collecotr) OnPlayGame added in v0.10.142

func (collector *Collecotr) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*Collecotr) OnStats added in v0.10.148

func (collector *Collecotr) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type CollecotrConfig added in v0.10.142

type CollecotrConfig struct {
	BasicComponentConfig `yaml:",inline"`
	MaxVal               int `yaml:"maxVal"`
}

MultiLevelReelsConfig - configuration for Collecotr

type ComponentConfig

type ComponentConfig struct {
	Name   string `yaml:"name"`
	Type   string `yaml:"type"`
	Config string `yaml:"config"`
}

type ComponentList

type ComponentList struct {
	Components    []IComponent
	MapComponents map[string]IComponent
}

func NewComponentList

func NewComponentList() *ComponentList

func (*ComponentList) AddComponent

func (lst *ComponentList) AddComponent(name string, component IComponent)

type ComponentMgr

type ComponentMgr struct {
	MapComponent map[string]FuncNewComponent
}

func NewComponentMgr

func NewComponentMgr() *ComponentMgr

func (*ComponentMgr) NewComponent

func (mgr *ComponentMgr) NewComponent(cfgComponent *ComponentConfig) IComponent

func (*ComponentMgr) Reg

func (mgr *ComponentMgr) Reg(component string, funcNew FuncNewComponent)

type Config

type Config struct {
	Name             string                         `yaml:"name"`
	Width            int                            `yaml:"width"`
	Height           int                            `yaml:"height"`
	Linedata         map[string]string              `yaml:"linedata"`
	MapLinedate      map[string]*sgc7game.LineData  `yaml:"-"`
	Paytables        map[string]string              `yaml:"paytables"`
	MapPaytables     map[string]*sgc7game.PayTables `yaml:"-"`
	IsIntReel        bool                           `yaml:"isIntReel"`
	Reels            map[string]string              `yaml:"reels"`
	MapReels         map[string]*sgc7game.ReelsData `yaml:"-"`
	SymbolsViewer    string                         `yaml:"symbolsViewer"`
	DefaultScene     string                         `yaml:"defaultScene"`
	DefaultPaytables string                         `yaml:"defaultPaytables"`
	DefaultLinedata  string                         `yaml:"defaultLinedata"`
	Bets             []int                          `yaml:"bets"`
	GameMods         []*GameModConfig               `yaml:"gamemods"`
	StatsSymbols     []string                       `yaml:"statsSymbols"`
	StatsSymbolCodes []mathtoolset.SymbolType       `yaml:"-"`
	Stats            *StatsConfig                   `yaml:"stats"`
	RTP              *RTPConfig                     `yaml:"rtp"`
}

func LoadConfig

func LoadConfig(fn string) (*Config, error)

func (*Config) BuildStatsSymbolCodes

func (cfg *Config) BuildStatsSymbolCodes(paytables *sgc7game.PayTables) error

type FuncNewComponent

type FuncNewComponent func(name string) IComponent

type Game

type Game struct {
	*sgc7game.BasicGame
	Prop         *GameProperty
	MgrComponent *ComponentMgr
}

Game - game

func NewGame

func NewGame(cfgfn string) (*Game, error)

NewGame - new a Game

func (*Game) CheckStake

func (game *Game) CheckStake(stake *sgc7game.Stake) error

CheckStake - check stake

func (*Game) Init

func (game *Game) Init(cfgfn string) error

Init - initial game

func (*Game) NewPlayerState

func (game *Game) NewPlayerState() sgc7game.IPlayerState

NewPlayerState - new playerstate

func (*Game) OnAsciiGame

func (game *Game) OnAsciiGame(stake *sgc7game.Stake, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult) error

OnAsciiGame - outpur to asciigame

func (*Game) ResetConfig

func (game *Game) ResetConfig(cfg interface{})

ResetConfig

type GameModConfig

type GameModConfig struct {
	Type       string             `yaml:"type"`
	Components []*ComponentConfig `yaml:"components"`
}

type GameParams

type GameParams struct {
	sgc7pb.GameParam `json:",inline"`
	LastScene        *sgc7game.GameScene `json:"-"`
	LastOtherScene   *sgc7game.GameScene `json:"-"`
}

type GameProperty

type GameProperty struct {
	Config           *Config
	MapVals          map[int]int
	MapStrVals       map[int]string
	CurPaytables     *sgc7game.PayTables
	CurLineData      *sgc7game.LineData
	CurReels         *sgc7game.ReelsData
	MapIntValWeights map[string]*sgc7game.ValWeights2
	SymbolsViewer    *SymbolsViewer
	MapSymbolColor   *asciigame.SymbolColorMap
	MapScenes        map[string]int
	MapOtherScenes   map[string]int
	MapCollectors    map[string]*Collecotr
	MapComponents    map[string]IComponent
	Stats            *sgc7stats.Feature
	MapStats         map[string]*sgc7stats.Feature
	MapInt           map[string]int
}

func InitGameProperty added in v0.10.129

func InitGameProperty(cfgfn string) (*GameProperty, error)

func (*GameProperty) AddVal

func (gameProp *GameProperty) AddVal(prop int, val int) error

func (*GameProperty) GetOtherScene

func (gameProp *GameProperty) GetOtherScene(pr *sgc7game.PlayResult, tag string) (*sgc7game.GameScene, int)

func (*GameProperty) GetScene

func (gameProp *GameProperty) GetScene(pr *sgc7game.PlayResult, tag string) (*sgc7game.GameScene, int)

func (*GameProperty) GetStrVal

func (gameProp *GameProperty) GetStrVal(prop int) string

func (*GameProperty) GetVal

func (gameProp *GameProperty) GetVal(prop int) int

func (*GameProperty) InitStats added in v0.10.148

func (gameProp *GameProperty) InitStats() error

func (*GameProperty) NewStatsWithConfig added in v0.10.148

func (gameProp *GameProperty) NewStatsWithConfig(parent *sgc7stats.Feature, cfg *StatsConfig) (*sgc7stats.Feature, error)

func (*GameProperty) OnFGSpin

func (gameProp *GameProperty) OnFGSpin() error

func (*GameProperty) OnNewStep

func (gameProp *GameProperty) OnNewStep() error

func (*GameProperty) Respin

func (gameProp *GameProperty) Respin(pr *sgc7game.PlayResult, gp *GameParams, respinComponent string, gs *sgc7game.GameScene, os *sgc7game.GameScene)

func (*GameProperty) RetriggerFG

func (gameProp *GameProperty) RetriggerFG(pr *sgc7game.PlayResult, gp *GameParams, fgnum int) error

func (*GameProperty) SetStrVal

func (gameProp *GameProperty) SetStrVal(prop int, val string) error

func (*GameProperty) SetVal

func (gameProp *GameProperty) SetVal(prop int, val int) error

func (*GameProperty) TagOtherScene

func (gameProp *GameProperty) TagOtherScene(pr *sgc7game.PlayResult, tag string, sceneIndex int)

func (*GameProperty) TagScene

func (gameProp *GameProperty) TagScene(pr *sgc7game.PlayResult, tag string, sceneIndex int)

func (*GameProperty) TriggerFG

func (gameProp *GameProperty) TriggerFG(pr *sgc7game.PlayResult, gp *GameParams, fgnum int, respinFirstComponent string) error

func (*GameProperty) TriggerFGWithWeights

func (gameProp *GameProperty) TriggerFGWithWeights(pr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin, fn string, respinFirstComponent string) error

type IComponent

type IComponent interface {
	// Init -
	Init(fn string, gameProp *GameProperty) error
	// OnNewGame -
	OnNewGame(gameProp *GameProperty) error
	// OnNewStep -
	OnNewStep(gameProp *GameProperty) error
	// OnPlayGame - on playgame
	OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
		cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error
	// OnAsciiGame - outpur to asciigame
	OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error
	// OnStats
	OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)
}

func NewBasicReels

func NewBasicReels(name string) IComponent

func NewBasicWins

func NewBasicWins(name string) IComponent

func NewBookOf

func NewBookOf(name string) IComponent

func NewCollector

func NewCollector(name string) IComponent

func NewLightning

func NewLightning(name string) IComponent

func NewMultiLevelMystery

func NewMultiLevelMystery(name string) IComponent

func NewMultiLevelReels

func NewMultiLevelReels(name string) IComponent

func NewMystery

func NewMystery(name string) IComponent

func NewSymbolMulti

func NewSymbolMulti(name string) IComponent

type Lightning

type Lightning struct {
	*BasicComponent
	Config                   *LightningConfig
	SymbolCode               int
	Weight                   *sgc7game.ValWeights2
	MapSymbols               map[int]*LightningSymbolData
	MapSymbolTriggerFeatures map[int]*LightningTriggerFeatureConfig
	ValSymbolCode            int
	MulSymbolCode            int
	CollectorSymbolCode      int
	Collector                int
	Val                      int
	Mul                      int
	NewConnector             int
}

func (*Lightning) Init

func (lightning *Lightning) Init(fn string, gameProp *GameProperty) error

Init -

func (*Lightning) OnAsciiGame

func (lightning *Lightning) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*Lightning) OnNewGame added in v0.10.142

func (lightning *Lightning) OnNewGame(gameProp *GameProperty) error

OnNewGame -

func (*Lightning) OnNewStep added in v0.10.142

func (lightning *Lightning) OnNewStep(gameProp *GameProperty) error

OnNewStep -

func (*Lightning) OnPlayGame

func (lightning *Lightning) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*Lightning) OnStats

func (lightning *Lightning) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type LightningConfig

type LightningConfig struct {
	BasicComponentConfig  `yaml:",inline"`
	Symbol                string                           `yaml:"symbol"`
	Weight                string                           `yaml:"weight"`
	SymbolVals            []*LightningSymbolValConfig      `yaml:"symbolVals"`
	SymbolTriggerFeatures []*LightningTriggerFeatureConfig `yaml:"symbolTriggerFeatures"`
	EndingFirstComponent  string                           `yaml:"endingFirstComponent"`
}

LightningConfig - configuration for Lightning

type LightningSymbolData

type LightningSymbolData struct {
	SymbolCode int
	Weight     *sgc7game.ValWeights2
	Config     *LightningSymbolValConfig
}

LightningSymbolData - symbol data for Lightning

type LightningSymbolValConfig

type LightningSymbolValConfig struct {
	Symbol string `yaml:"symbol"`
	Weight string `yaml:"weight"`
	Type   string `yaml:"type"` // like val or mul
}

LightningSymbolValConfig - configuration for symbol value

type LightningTriggerFeatureConfig

type LightningTriggerFeatureConfig struct {
	Symbol  string `yaml:"symbol"`  // like NEW_COLLECTOR
	Feature string `yaml:"feature"` // like collector
}

LightningTriggerFeatureConfig - configuration for lightning trigger feature

type MultiLevelMystery

type MultiLevelMystery struct {
	*BasicComponent
	Config                   *MultiLevelMysteryConfig
	MysterySymbol            int
	MapMysteryTriggerFeature map[int]*MysteryTriggerFeatureConfig
	LevelMysteryWeights      []*sgc7game.ValWeights2
	CurLevel                 int
}

func (*MultiLevelMystery) Init

func (multiLevelMystery *MultiLevelMystery) Init(fn string, gameProp *GameProperty) error

Init -

func (*MultiLevelMystery) OnAsciiGame

func (multiLevelMystery *MultiLevelMystery) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*MultiLevelMystery) OnNewGame

func (multiLevelMystery *MultiLevelMystery) OnNewGame(gameProp *GameProperty) error

OnNewGame -

func (*MultiLevelMystery) OnNewStep

func (multiLevelMystery *MultiLevelMystery) OnNewStep(gameProp *GameProperty) error

OnNewStep -

func (*MultiLevelMystery) OnPlayGame

func (multiLevelMystery *MultiLevelMystery) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*MultiLevelMystery) OnStats

func (multiLevelMystery *MultiLevelMystery) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type MultiLevelMysteryConfig

type MultiLevelMysteryConfig struct {
	BasicComponentConfig   `yaml:",inline"`
	Mystery                string                          `yaml:"mystery"`
	Levels                 []*MultiLevelMysteryLevelConfig `yaml:"levels"`
	MysteryTriggerFeatures []*MysteryTriggerFeatureConfig  `yaml:"mysteryTriggerFeatures"`
}

MultiLevelMysteryConfig - configuration for MultiLevelMystery

type MultiLevelMysteryLevelConfig

type MultiLevelMysteryLevelConfig struct {
	MysteryWeight string `yaml:"mysteryWeight"`
	Collector     string `yaml:"collector"`
	CollectorVal  int    `yaml:"collectorVal"`
}

MultiLevelMysteryLevelConfig - configuration for MultiLevelMystery's Level

type MultiLevelReels

type MultiLevelReels struct {
	*BasicComponent
	Config              *MultiLevelReelsConfig
	LevelReelSetWeights []*sgc7game.ValWeights2
	CurLevel            int
}

func (*MultiLevelReels) Init

func (multiLevelReels *MultiLevelReels) Init(fn string, gameProp *GameProperty) error

Init -

func (*MultiLevelReels) OnAsciiGame

func (multiLevelReels *MultiLevelReels) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*MultiLevelReels) OnNewGame

func (multiLevelReels *MultiLevelReels) OnNewGame(gameProp *GameProperty) error

OnNewGame -

func (*MultiLevelReels) OnNewStep

func (multiLevelReels *MultiLevelReels) OnNewStep(gameProp *GameProperty) error

OnNewStep -

func (*MultiLevelReels) OnPlayGame

func (multiLevelReels *MultiLevelReels) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*MultiLevelReels) OnStats

func (multiLevelReels *MultiLevelReels) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type MultiLevelReelsConfig

type MultiLevelReelsConfig struct {
	BasicComponentConfig `yaml:",inline"`
	Levels               []*MultiLevelReelsLevelConfig `yaml:"levels"`
	IsFGMainSpin         bool                          `yaml:"isFGMainSpin"`
}

MultiLevelReelsConfig - configuration for MultiLevelReels

type MultiLevelReelsLevelConfig

type MultiLevelReelsLevelConfig struct {
	Reel           string `yaml:"reel"`
	ReelSetsWeight string `yaml:"reelSetWeight"`
	Collector      string `yaml:"collector"`
	CollectorVal   int    `yaml:"collectorVal"`
}

MultiLevelReelsLevelConfig - configuration for MultiLevelReels's Level

type Mystery

type Mystery struct {
	*BasicComponent
	Config                   *MysteryConfig
	MysteryWeights           *sgc7game.ValWeights2
	MysterySymbol            int
	MapMysteryTriggerFeature map[int]*MysteryTriggerFeatureConfig
}

func (*Mystery) Init

func (mystery *Mystery) Init(fn string, gameProp *GameProperty) error

Init -

func (*Mystery) OnAsciiGame

func (mystery *Mystery) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*Mystery) OnNewGame added in v0.10.142

func (mystery *Mystery) OnNewGame(gameProp *GameProperty) error

OnNewGame -

func (*Mystery) OnNewStep added in v0.10.142

func (mystery *Mystery) OnNewStep(gameProp *GameProperty) error

OnNewStep -

func (*Mystery) OnPlayGame

func (mystery *Mystery) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*Mystery) OnStats

func (mystery *Mystery) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type MysteryConfig

type MysteryConfig struct {
	BasicComponentConfig   `yaml:",inline"`
	MysteryWeight          string                         `yaml:"mysteryWeight"`
	Mystery                string                         `yaml:"mystery"`
	MysteryTriggerFeatures []*MysteryTriggerFeatureConfig `yaml:"mysteryTriggerFeatures"`
}

MysteryConfig - configuration for Mystery

type MysteryTriggerFeatureConfig

type MysteryTriggerFeatureConfig struct {
	Symbol               string `yaml:"symbol"`               // like LIGHTNING
	RespinFirstComponent string `yaml:"respinFirstComponent"` // like lightning
}

MysteryTriggerFeatureConfig - configuration for mystery trigger feature

type RTPConfig

type RTPConfig struct {
	Modules         []*RTPSymbolModule   `yaml:"modules"`
	HitRateFeatures []*RTPHitRateFeature `yaml:"hitRateFeatures"`
}

type RTPHitRateFeature

type RTPHitRateFeature struct {
	Name       string   `yaml:"name"`
	Components []string `yaml:"components"`
}

type RTPSymbolFeature

type RTPSymbolFeature struct {
	Name       string   `yaml:"name"`
	Components []string `yaml:"components"`
}

type RTPSymbolModule

type RTPSymbolModule struct {
	Name       string              `yaml:"name"`
	Components []string            `yaml:"components"`
	Features   []*RTPSymbolFeature `yaml:"features"`
}

type ScriptCore

type ScriptCore struct {
	Cel *cel.Env
}

func NewScriptCore

func NewScriptCore(gameProp *GameProperty) (*ScriptCore, error)

type StatsConfig

type StatsConfig struct {
	Name      string         `yaml:"name"`
	Component string         `yaml:"component"`
	Children  []*StatsConfig `yaml:"children"`
}

type SymbolMulti

type SymbolMulti struct {
	*BasicComponent
	Config      *SymbolMultiConfig
	SymbolCode  int
	WeightMulti *sgc7game.ValWeights2
}

func (*SymbolMulti) Init

func (symbolMulti *SymbolMulti) Init(fn string, gameProp *GameProperty) error

Init -

func (*SymbolMulti) OnAsciiGame

func (symbolMulti *SymbolMulti) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*SymbolMulti) OnNewGame added in v0.10.162

func (symbolMulti *SymbolMulti) OnNewGame(gameProp *GameProperty) error

OnNewGame -

func (*SymbolMulti) OnNewStep added in v0.10.162

func (symbolMulti *SymbolMulti) OnNewStep(gameProp *GameProperty) error

OnNewStep -

func (*SymbolMulti) OnPlayGame

func (symbolMulti *SymbolMulti) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*SymbolMulti) OnStats

func (symbolMulti *SymbolMulti) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type SymbolMultiConfig

type SymbolMultiConfig struct {
	BasicComponentConfig `yaml:",inline"`
	Symbol               string `yaml:"symbol"`
	WeightMulti          string `yaml:"weightMulti"`
}

SymbolMultiConfig - configuration for SymbolMulti feature

type SymbolViewerData

type SymbolViewerData struct {
	Code   int
	Symbol string
	Output string
	Color  string
}

type SymbolsViewer

type SymbolsViewer struct {
	MapSymbols map[int]*SymbolViewerData
}

func LoadSymbolsViewer

func LoadSymbolsViewer(fn string) (*SymbolsViewer, error)

type TriggerFeatureConfig

type TriggerFeatureConfig struct {
	TargetScene          string `yaml:"targetScene"`          // like basicReels.mstery
	Symbol               string `yaml:"symbol"`               // like scatter
	Type                 string `yaml:"type"`                 // like scatters
	MinNum               int    `yaml:"minNum"`               // like 3
	Scripts              string `yaml:"scripts"`              // scripts
	FGNum                int    `yaml:"FGNum"`                // FG number
	FGNumWeight          string `yaml:"FGNumWeight"`          // FG number weight
	IsTriggerFG          bool   `yaml:"isTriggerFG"`          // is trigger FG
	BetType              string `yaml:"betType"`              // bet or totalBet
	RespinFirstComponent string `yaml:"respinFirstComponent"` // like fg-spin
}

TriggerFeatureConfig - configuration for trigger feature

Jump to

Keyboard shortcuts

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