Documentation ¶
Index ¶
- Variables
- func GetNumber(number int) string
- func InsertString(s string, insert string, n int) string
- func Max(x, y int) int
- func Min(x, y int) int
- type Menu
- type MenuBase
- func (m MenuBase) HasSize() bool
- func (m MenuBase) WithSize(size tea.WindowSizeMsg) MenuBase
- func (m MenuBase) WithZones(zones *zone.Manager) MenuBase
- func (m MenuBase) ZoneBackground(zone string, hover lipgloss.Color, normal lipgloss.Color) lipgloss.Color
- func (m MenuBase) ZoneInBounds(zone string) bool
- func (m MenuBase) ZoneMark(zone string, str string) string
Constants ¶
This section is empty.
Variables ¶
var About = `` /* 473-byte string literal not displayed */
About is the about text.
var Numbers = []string{
` ██████
██ ████
██ ██ ██
████ ██
██████`,
` ██
███
██
██
██ `,
`██████
██
█████
██
███████ `,
`██████
██
█████
██
██████ `,
`██ ██
██ ██
███████
██
██`,
`███████
██
███████
██
███████`,
` ██████
██
███████
██ ██
██████`,
`███████
██
██
██
██`,
` █████
██ ██
█████
██ ██
█████`,
` █████
██ ██
██████
██
█████`,
}
Numbers is a slice of strings that represent the numbers 0-9 in a 5x5 grid.
var Title = `` /* 652-byte string literal not displayed */
Title is the title of the game.
Functions ¶
func InsertString ¶ added in v0.1.6
InsertString inserts a string into another string at a given index.
Types ¶
type Menu ¶
Menu is a tea.Model that keeps track of its size. It is intended to trigger the re-distribution of the tea.WindowSizeMsg for nested models. It also contains some common functionality for menus.
type MenuBase ¶
MenuBase is the base Menu implementation.
func (MenuBase) WithSize ¶ added in v0.1.8
func (m MenuBase) WithSize(size tea.WindowSizeMsg) MenuBase
WithSize returns a new MenuBase with the given size.
func (MenuBase) WithZones ¶ added in v0.1.8
WithZones returns a new MenuBase with the given zone manager.
func (MenuBase) ZoneBackground ¶ added in v0.1.8
func (m MenuBase) ZoneBackground(zone string, hover lipgloss.Color, normal lipgloss.Color) lipgloss.Color
ZoneBackground returns the background color for a zone.
func (MenuBase) ZoneInBounds ¶ added in v0.1.8
ZoneInBounds returns true if the last mouse position is in the bounds of the given zone.