gameplate

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: GPL-3.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const EmptyNum = -9999

EmptyNum is mean not this symbol

Variables

This section is empty.

Functions

func CutSymbolLink(symbolLine []int, option PlateOption) []int

CutSymbolLink get line link array

func LineMulitResult

func LineMulitResult(line []int, option PlateOption) [][]int

LineMulitResult return line mulit win if was

func NewPlate

func NewPlate(plateSize []int, scroll [][]int) ([]int, []int)

NewPlate 1D plate

func NewPlate2D

func NewPlate2D(plateSize []int, scroll [][]int) ([][]int, [][]int)

NewPlate2D plate

func NewPlateOneByOne2D

func NewPlateOneByOne2D(plateSize []int, scroll [][]int) ([][]int, [][]int)

NewPlateOneByOne2D ....

func PlateSymbolCollect

func PlateSymbolCollect(targetSymbolNum int, plate [][]int, option PlateOption, funcOption map[string]interface{}) map[string]interface{}

PlateSymbolCollect collect symbol in plate

func PlateSymbolCount

func PlateSymbolCount(targetSymbol int, plate [][]int) int

PlateSymbolCount collect target symbol

func PlateSymbolPoint

func PlateSymbolPoint(targetSymbol int, plate [][]int) (int, [][]int)

PlateSymbolPoint collect target symbol point

func PlateToLinePlate

func PlateToLinePlate(plate [][]int, lineMap [][]int) [][]int

PlateToLinePlate ...

func ResultMap

func ResultMap(scrollIndex, plate interface{}, scores int64, islink bool) map[string]interface{}

ResultMap game result base info

func ResultMap243

func ResultMap243(scrollIndex, plate, gameresult interface{}) map[string]interface{}

ResultMap243 game result base info

func ResultMapLine

func ResultMapLine(scrollIndex, plate, gameresult interface{}) map[string]interface{}

ResultMapLine game result base info

Types

type InfoLine

type InfoLine struct {
	// plate info
	ScotterPoint    [][]int `json:"ScotterPoint"`
	WildPoint       [][]int `json:"WildPoint"`
	LineSymbolPoint [][]int `json:"LineSymbolPoint"`
	LineSymbolNum   [][]int `json:"LineSymbolNum"`
	LineWinIndex    int     `json:"LineWinIndex"`

	// pay info
	Score          int64 `json:"Score"`
	JackPotScore   int64 `json:"JackPotScore"`
	SpecialWinRate int64 `json:"SpecialWinRate"`
	LineWinRate    int   `json:"LineWinRate"`
}

InfoLine minimum result structure

func NewInfoLine

func NewInfoLine() InfoLine

NewInfoLine Get default init NewLineInfo

func (*InfoLine) AddEmptyPoint

func (I *InfoLine) AddEmptyPoint()

AddEmptyPoint add new empty point

func (*InfoLine) AddNewLine

func (I *InfoLine) AddNewLine(symbolNums []int, linePoint []int, option PlateOption)

AddNewLine ...

func (*InfoLine) AddNewPoint

func (I *InfoLine) AddNewPoint(symbolNum int, point int, option PlateOption)

AddNewPoint add new line point

func (*InfoLine) ScotterCount

func (I *InfoLine) ScotterCount() int

ScotterCount ...

func (*InfoLine) WildCount

func (I *InfoLine) WildCount() int

WildCount ...

type InfoLine243

type InfoLine243 struct {
	// plate info
	ScotterPoint   [][]int `json:"ScotterPoint"`
	WildPoint      [][]int `json:"WildPoint"`
	WinSymbolPoint [][]int `json:"WinSymbolPoint"`
	WinSymbolNum   [][]int `json:"WinSymbolNum"`

	// pay info
	Score          int64 `json:"Score"`
	JackPotScore   int64 `json:"JackPotScore"`
	SpecialWinRate int64 `json:"SpecialWinRate"`
	LineWinRate    int   `json:"LineWinRate"`
}

InfoLine243 minimum result structure

func NewInfoLine243

func NewInfoLine243() InfoLine243

NewInfoLine243 Get default init NewLineInfo

func (*InfoLine243) AddNewPoint

func (I *InfoLine243) AddNewPoint(symbolNum int, point int, option PlateOption)

AddNewPoint add new line point

func (*InfoLine243) AddNewWinSymol

func (I *InfoLine243) AddNewWinSymol(symbolNums []int, linePoint []int, option PlateOption)

AddNewWinSymol ...

func (*InfoLine243) ScotterCount

func (I *InfoLine243) ScotterCount() int

ScotterCount ...

func (*InfoLine243) WildCount

func (I *InfoLine243) WildCount() int

WildCount ...

type PlateOption

type PlateOption struct {
	Wild          []int         // symbol index
	Scotter       []int         // symbol index
	Space         []int         // symbol index
	Group         map[int][]int // groupID symbol index
	LineMiniCount int
}

PlateOption plate symbol index option

func (*PlateOption) EmptyNum

func (p *PlateOption) EmptyNum() int

EmptyNum this number don't use, is use compare does symbol set.

func (*PlateOption) IsScotter

func (p *PlateOption) IsScotter(item int) (bool, int)

IsScotter Scotter compare

func (*PlateOption) IsSpace

func (p *PlateOption) IsSpace(item int) (bool, int)

IsSpace Space compare

func (*PlateOption) IsWild

func (p *PlateOption) IsWild(item int) (bool, int)

IsWild wild compare

Jump to

Keyboard shortcuts

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