game

package
v0.0.0-...-e95f638 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

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

Game represents the bubbletea model for the game.

func New

func New(width, height int) *Game

New creates a new game with the specified width and height for the grid.

func (*Game) Init

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

Init initializes the game.

func (*Game) Update

func (g *Game) Update(message tea.Msg) (tea.Model, tea.Cmd)

Update updates the game state depending on the message received.

func (*Game) View

func (g *Game) View() string

View returns the game view.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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