util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Faint = iota
	White
	Red
	Green
	BrightGreen
	Blue
	Yellow
	Magenta
	Cyan
	WallColor
	WaterColor  = Blue
	PlayerColor = BrightGreen
	Ghost       = Red
	Char
	Nothing

	WallPortrait   = '#'
	WaterPortrait  = '~'
	PlayerPortrait = 'P'
	GhostPortrait  = 'G'

	Win    = 1
	Lost   = -1
	Gaming = 0
)

Variables

View Source
var DifficultyMap = map[Difficulty]time.Duration{
	Easy:   time.Second,
	Medium: 500 * time.Millisecond,
	Hard:   250 * time.Millisecond,
}

Functions

func GetColor

func GetColor(color int) termenv.ANSIColor

func IsAlphanumeric

func IsAlphanumeric(chr rune) bool

func MinFloat

func MinFloat(nums ...float64) float64

Types

type Difficulty

type Difficulty int
const (
	Easy Difficulty = iota
	Medium
	Hard
)

Jump to

Keyboard shortcuts

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