asciigame

package
v0.12.43 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ColorExitKey *color.Color
View Source
var ColorKey *color.Color
View Source
var ColorLose *color.Color
View Source
var ColorNumber *color.Color
View Source
var ColorWin *color.Color

Functions

func FormatColorString

func FormatColorString(str string, c *color.Color) string

func IsPosInResult added in v0.10.319

func IsPosInResult(x, y int, result *sgc7game.PlayResult) bool

func OutputOtherScene

func OutputOtherScene(str string, scene *sgc7game.GameScene)

func OutputResults

func OutputResults(str string, result *sgc7game.PlayResult, isResult FuncIsResult, mapSymbolColor *SymbolColorMap)

func OutputReverseOtherScene added in v0.10.390

func OutputReverseOtherScene(str string, scene *sgc7game.GameScene)

func OutputReverseScene added in v0.10.317

func OutputReverseScene(str string, scene *sgc7game.GameScene, mapSymbolColor *SymbolColorMap)

func OutputReverseSceneEx added in v0.10.319

func OutputReverseSceneEx(str string, scene *sgc7game.GameScene, result *sgc7game.PlayResult, c *color.Color, mapSymbolColor *SymbolColorMap)

func OutputScene

func OutputScene(str string, scene *sgc7game.GameScene, mapSymbolColor *SymbolColorMap)

func SelectColor

func SelectColor(onselect FuncOnSelectColor, c1 *color.Color, c2 *color.Color) *color.Color

func StartGame

func StartGame(game sgc7game.IGame, stake *sgc7game.Stake, onResult FuncOnResult, autogametimes int, isSkipGetChar bool, isBreakAtFeature bool) error

Types

type FuncGetSymbolString

type FuncGetSymbolString func(int) string

type FuncIsResult

type FuncIsResult func(int, *sgc7game.Result) bool

type FuncOnGetChar

type FuncOnGetChar func(k getch.KeyCode) bool

if return true, then break

type FuncOnResult

type FuncOnResult func(*sgc7game.PlayResult, []*sgc7game.PlayResult, any)

type FuncOnSelectColor

type FuncOnSelectColor func() bool

type SymbolColorMap

type SymbolColorMap struct {
	MapSymbols        map[int]*color.Color
	PayTables         *sgc7game.PayTables
	OnGetSymbolString FuncGetSymbolString
}

func NewSymbolColorMap

func NewSymbolColorMap(paytables *sgc7game.PayTables) *SymbolColorMap

func (*SymbolColorMap) AddSymbolColor

func (mapSymbolColor *SymbolColorMap) AddSymbolColor(s int, c *color.Color)

func (*SymbolColorMap) GetSymbolString

func (mapSymbolColor *SymbolColorMap) GetSymbolString(s int) string

Jump to

Keyboard shortcuts

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