relaxutils

package
v0.9.53 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveConfig

func SaveConfig(fn string, cfg interface{}, procSelfCloseTags FuncOnSelfCloseTags) error

Types

type Config

type Config struct {
	XMLName        xml.Name    `xml:"config"`
	GeneralComment string      `xml:",comment"`
	SD             float32     `xml:"sd"`
	RTP            float32     `xml:"rtp"`
	ID             int         `xml:"id"`
	Name           string      `xml:"name"`
	ConfigVersion  string      `xml:"configVersion"`
	RTPsComment    string      `xml:",comment"`
	RTPs           *FloatList  `xml:"rtps"`
	ConfigComment  string      `xml:",comment"`
	Symbols        *Symbols    `xml:"symbols"`
	Wilds          *StringList `xml:"wilds"`
	Payouts        *Payouts    `xml:"payouts"`
	PayingSymbols  *StringList `xml:"payingSymbols"`
}

func NewConfig

func NewConfig() *Config

type FloatList

type FloatList struct {
	Vals []float32 `xml:"item"`
}

type FuncOnSelfCloseTags

type FuncOnSelfCloseTags func(string) string

type Int2DArray

type Int2DArray struct {
	Rows []*IntList `xml:"row"`
}

type Int3DArray

type Int3DArray struct {
	Tables []*Int2DArray `xml:"tbl"`
}

func BuildInt3DArray

func BuildInt3DArray(lst []*sgc7game.ReelsPosData) *Int3DArray

type IntList

type IntList struct {
	Vals []int `xml:"item"`
}

type Payout

type Payout struct {
	XMLName xml.Name `xml:"symbol"`
	Name    string   `xml:"name,attr"`
	Wins    []*PayoutWin
}

type PayoutWin

type PayoutWin struct {
	XMLName xml.Name `xml:"win"`
	Count   int      `xml:"count,attr"`
	Payout  int      `xml:"payout,attr"`
}

type Payouts

type Payouts struct {
	XMLName xml.Name `xml:"payouts"`
	Payouts []*Payout
}

func BuildPayouts

func BuildPayouts(pt *sgc7game.PayTables) *Payouts

type Reels

type Reels struct {
	Tables []*Table
}

func BuildReels

func BuildReels(reels []*sgc7game.ReelsData, pt *sgc7game.PayTables) *Reels

type StringList

type StringList struct {
	Vals []string `xml:"item"`
}

type Symbol

type Symbol struct {
	XMLName xml.Name `xml:"symbol"`
	Name    string   `xml:"name,attr"`
	Val     int      `xml:"value,attr"`
}

type Symbols

type Symbols struct {
	XMLName xml.Name  `xml:"symbols"`
	Symbols []*Symbol `xml:"symbol"`
}

func BuildSymbols

func BuildSymbols(symbols []string) *Symbols

type Table

type Table struct {
	XMLName      xml.Name      `xml:"table"`
	TableComment string        `xml:",comment"`
	Reel         []*StringList `xml:"reel"`
}

type Weights

type Weights struct {
	Entries []*IntList `xml:"entry"`
}

func BuildWeights

func BuildWeights(weights []int) *Weights

func BuildWeightsEx

func BuildWeightsEx(vals []int, weights []int) *Weights

type WeightsArr

type WeightsArr struct {
	Weights []*Weights `xml:"weights"`
}

func BuildWeightsArr

func BuildWeightsArr(weights [][]int) *WeightsArr

func BuildWeightsArrEx

func BuildWeightsArrEx(vals []int, weights [][]int) *WeightsArr

Jump to

Keyboard shortcuts

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