game

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GameFactory = map[string]func() any{}
View Source
var GameList = []*GameInfo{}
View Source
var ScanFactory = map[string]Scanner{}

Functions

func MakeRtpList added in v0.5.0

func MakeRtpList[T any](reelsmap map[float64]T) []float64

Types

type GP added in v0.7.0

type GP uint
const (
	GPsel    GP = 0b_0000_0000_0000_0001 // user can change lines
	GPrline  GP = 0b_0000_0000_0000_0010 // pays left to right and right to left
	GPcline  GP = 0b_0000_0000_0000_0100 // pays for combination at any position
	GPjack   GP = 0b_0000_0000_0000_1000 // cumulative jackpot is present
	GPfgno   GP = 0                      // free games are absent
	GPfghas  GP = 0b_0000_0000_0001_0000 // non-retriggered free games are present
	GPretrig GP = 0b_0000_0000_0010_0000 // free games are present and can be retriggered
	GPfgmult GP = 0b_0000_0000_0100_0000 // any multipliers on free games
	GPfgreel GP = 0b_0000_0000_1000_0000 // separate reels on free games
	GPscat   GP = 0b_0000_0001_0000_0000 // has scatters
	GPwild   GP = 0b_0000_0010_0000_0000 // has wild symbols
	GPrwild  GP = 0b_0000_0100_0000_0000 // has reel wild symbols
	GPbwild  GP = 0b_0000_1000_0000_0000 // has big wild (3x3)
	GPwmult  GP = 0b_0001_0000_0000_0000 // has multiplier on wilds
	GPbsym   GP = 0b_0010_0000_0000_0000 // has big symbol (usually 3x3 in the center on free games)
	GPfill   GP = 0b_0100_0000_0000_0000 // has multiplier on filled screen
)

type GameAlias added in v0.5.0

type GameAlias struct {
	Prov string `json:"prov" yaml:"prov" xml:"prov"`
	Name string `json:"name" yaml:"name" xml:"name"`
}

type GameInfo added in v0.5.0

type GameInfo struct {
	Aliases []GameAlias `json:"aliases" yaml:"aliases" xml:"aliases"`
	GP      GP          `json:"gp,omitempty" yaml:"gp,omitempty" xml:"gp,omitempty"` // game properties
	SX      int         `json:"sx,omitempty" yaml:"sx,omitempty" xml:"sx,omitempty"` // screen width
	SY      int         `json:"sy,omitempty" yaml:"sy,omitempty" xml:"sy,omitempty"` // screen height
	SN      int         `json:"sn,omitempty" yaml:"sn,omitempty" xml:"sn,omitempty"` // number of symbols
	LN      int         `json:"ln,omitempty" yaml:"ln,omitempty" xml:"ln,omitempty"` // number of lines
	BN      int         `json:"bn,omitempty" yaml:"bn,omitempty" xml:"bn,omitempty"` // number of bonuses
	RTP     []float64   `json:"rtp" yaml:"rtp" xml:"rtp"`                            // 'Return to Player' percents list
}

func GetInfo added in v0.7.0

func GetInfo(alias string) *GameInfo

func (*GameInfo) FindRTP added in v0.7.0

func (gi *GameInfo) FindRTP(mrtp float64) (rtp float64)

func (*GameInfo) SetupFactory added in v0.7.0

func (gi *GameInfo) SetupFactory(game func() any, scan Scanner)

type Scanner added in v0.6.0

type Scanner func(context.Context, float64) float64

Jump to

Keyboard shortcuts

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