game

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	// contains filtered or unexported fields
}

func New

func New(name string) *Base

func (*Base) AddKeyGroup

func (g *Base) AddKeyGroup(group KeyGroup)

func (*Base) ClearGroups

func (g *Base) ClearGroups()

func (*Base) FilterValue

func (b *Base) FilterValue() string

func (*Base) Init

func (g *Base) Init() tea.Cmd

func (*Base) Name

func (b *Base) Name() string

func (*Base) RegisterHelp

func (g *Base) RegisterHelp(action ViewFunc)

func (*Base) RegisterLevels

func (b *Base) RegisterLevels(total int, action SetLevelAction)

func (*Base) RegisterView

func (g *Base) RegisterView(action ViewFunc)

func (*Base) SetError

func (g *Base) SetError(err error)

func (*Base) SetFailure

func (g *Base) SetFailure(msg string)

func (*Base) SetParent

func (b *Base) SetParent(parent tea.Model)

func (*Base) SetStars

func (g *Base) SetStars(total, erned int)

func (*Base) SetSuccess

func (g *Base) SetSuccess(msg string)

func (*Base) Update

func (g *Base) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Base) View

func (g *Base) View() string

type Game

type Game interface {
	Name() string
	SetParent(tea.Model)
	tea.Model
	list.Item
}

type KeyGroup

type KeyGroup []*key.Binding

func (KeyGroup) FullHelp

func (g KeyGroup) FullHelp() [][]key.Binding

func (KeyGroup) ShortHelp

func (g KeyGroup) ShortHelp() []key.Binding

type KeyMap

type KeyMap struct {
	// contains filtered or unexported fields
}

type SetLevelAction

type SetLevelAction func(int)

type ViewFunc

type ViewFunc func() string

Jump to

Keyboard shortcuts

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