model

package
v0.0.0-...-bd35d1c Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CursorMotion

type CursorMotion int
const (
	CursorUp CursorMotion = iota
	CursorDown
	CursorLeft
	CursorRight
)

type GameState

type GameState int
const (
	Playing GameState = iota
	Win
	Lost
)

type Model

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

func InitialModel

func InitialModel(config board.BoardConfig) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (*Model) MoveCursor

func (m *Model) MoveCursor(dir CursorMotion)

func (*Model) SetState

func (m *Model) SetState(state GameState)

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

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