asciigame

package
v0.10.58 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 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 OutputResults

func OutputResults(str string, result *sgc7game.PlayResult, isResult FuncIsResult, 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) error

Types

type FuncIsResult

type FuncIsResult func(*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)

type FuncOnSelectColor

type FuncOnSelectColor func() bool

type SymbolColorMap

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

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