slotopol

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Eldorado = []float64{
	1000,
	10,
	25,
	100,
	10,
	50,
	300,
	10,
	50,
	200,
	10,
	25,
	100,
	25,
	10,
	100,
	10,
	50,
	10,
	25,
}

Average gain = 106

View Source
var Emje float64 // Eldorado game 1 spin calculated expectation
View Source
var Emjm float64 // Monopoly game calculated expectation
View Source
var Jackpot = [13][5]int{
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, jid},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
}

Jackpot win combinations.

View Source
var LineBonus = [13][5]int{
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, mje9},
	{0, 0, 0, 0, mjm},
}

Lined bonus games

View Source
var LinePay = [13][5]float64{
	{0, 0, 0, 0, 0},
	{0, 2, 5, 15, 100},
	{0, 2, 5, 15, 100},
	{0, 0, 5, 15, 100},
	{0, 0, 5, 15, 100},
	{0, 0, 5, 15, 100},
	{0, 0, 5, 15, 100},
	{0, 0, 5, 15, 100},
	{0, 2, 5, 15, 100},
	{0, 2, 5, 15, 100},
	{0, 10, 100, 2000, 10000},
	{0, 0, 0, 0, 0},
	{0, 0, 0, 0, 0},
}

Lined payment.

View Source
var Monopoly = []MonCell{
	{5, 0, false},
	{15, 0, false},
	{15, 0, false},
	{30, 0, false},
	{30, 0, false},
	{10, 0, true},
	{0, 0, false},
	{0, 1, false},
	{50, 0, false},
	{50, 0, false},
	{0, 0, false},
	{20, 0, true},
	{0, 4, false},
	{80, 0, false},
	{80, 0, false},
	{30, 0, true},
	{0, 7, false},
	{120, 0, false},
	{120, 0, false},
	{200, 0, false},
}

count = 279936, sum = 80231330, avr = 286.60597422268, zerocount = 1, p(zero) = 0.00035722450845908% variance = 15529.19650266, sigma = 124.61619679103, limits = 161.98977743165...411.22217101371

View Source
var Reels100 = game.Reels5x{
	{13, 1, 5, 12, 13, 11, 12, 11, 13, 8, 2, 12, 13, 3, 4, 6, 13, 2, 5, 10, 13, 9, 7, 8, 13, 10, 7, 9, 13, 3, 4, 6},
	{9, 5, 10, 13, 9, 6, 3, 4, 13, 2, 12, 8, 12, 13, 11, 12, 11, 13, 5, 7, 10, 6, 3, 4, 13, 2, 12, 8, 13, 7, 1, 12},
	{12, 13, 11, 12, 11, 13, 5, 10, 9, 7, 1, 12, 13, 3, 8, 6, 12, 13, 8, 4, 12, 2, 5, 10, 13, 7, 2, 13, 6, 3, 4, 9},
	{12, 1, 2, 13, 6, 5, 12, 4, 8, 12, 13, 3, 10, 9, 7, 13, 11, 11, 11, 11, 13, 5, 12, 9, 8, 6, 13, 3, 10, 2, 7, 4},
	{13, 11, 13, 12, 6, 4, 12, 3, 2, 5, 12, 10, 7, 12, 8, 1, 9, 12, 8, 9, 12, 4, 3, 12, 2, 5, 12, 10, 7, 13, 12, 6},
}

Original reels. reels lengths [32, 32, 32, 32, 32], total reshuffles 33554432 symbols: 48.848(lined) + 39.546(scatter) = 88.394135% spin9 bonuses: count 2700, rtp = 7.676482% monopoly bonuses: count 4320, rtp = 3.689938% jackpots: count 32, frequency 1/1048576 RTP = 88.394(sym) + 7.6765(mje9) + 3.6899(mjm) = 99.760556%

View Source
var ReelsMap = map[string]*game.Reels5x{
	"100": &Reels100,
}

Map with available reels.

View Source
var ScatPay = [5]float64{0, 5, 8, 20, 1000} // 1 dollar

Scatters payment.

Functions

func CalcStat

func CalcStat(ctx context.Context, rn string) float64

func EldoradoSpawn

func EldoradoSpawn(bet float64, spins int) (any, float64)

func ExpEldorado

func ExpEldorado() float64

Eldorado expectation.

func ExpMonopoly

func ExpMonopoly() float64

func MonopolySpawn

func MonopolySpawn(bet float64) (any, float64)

Types

type Game

type Game struct {
	game.Slot5x3 `yaml:",inline"`
}

func NewGame

func NewGame(rd string) *Game

func (*Game) ScanLined

func (g *Game) ScanLined(screen game.Screen, ws *game.WinScan)

Lined symbols calculation.

func (*Game) ScanScatters

func (g *Game) ScanScatters(screen game.Screen, ws *game.WinScan)

Scatters calculation.

func (*Game) Scanner

func (g *Game) Scanner(screen game.Screen, ws *game.WinScan)

func (*Game) SetLines

func (g *Game) SetLines(sbl game.SBL) error

func (*Game) SetReels

func (g *Game) SetReels(rd string) error

func (*Game) Spawn

func (g *Game) Spawn(screen game.Screen, sw *game.WinScan)

func (*Game) Spin

func (g *Game) Spin(screen game.Screen)

type MonCell

type MonCell struct {
	Mult float64 `json:"mult" yaml:"mult" xml:"mult,attr"` // bet multiplier
	Jump int     `json:"jump" yaml:"jump" xml:"jump,attr"` // jump position, or 0 if no jump
	Dice bool    `json:"dice" yaml:"dice" xml:"dice,attr"` // is here multiply on dice value
}

type WinElSeg

type WinElSeg struct {
	Pos  int     `json:"pos" yaml:"pos" xml:"pos,attr"`    // segment number, starts from 1
	Pay  float64 `json:"pay" yaml:"pay" xml:"pay,attr"`    // pay by this segment
	Mult float64 `json:"mult" yaml:"mult" xml:"mult,attr"` // bet multiplier
}

type WinMonCell

type WinMonCell struct {
	MonCell `yaml:",inline"`
	Pos     int     `json:"pos" yaml:"pos" xml:"pos,attr"` // cell number, starts from 1
	Pay     float64 `json:"pay" yaml:"pay" xml:"pay,attr"` // pay by this cell
}

Jump to

Keyboard shortcuts

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