conway

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tick

func Tick(ctx context.Context, wait time.Duration) tea.Cmd

Types

type Conway

type Conway struct {
	Pattern *pattern.Pattern

	ResumeOnFocus bool
	// contains filtered or unexported fields
}

func NewConway

func NewConway(conf *config.Config) *Conway

func (*Conway) Clear

func (c *Conway) Clear()

func (*Conway) Init

func (c *Conway) Init() tea.Cmd

func (*Conway) Pause

func (c *Conway) Pause()

func (*Conway) Play

func (c *Conway) Play() tea.Cmd

func (*Conway) RenderStats

func (c *Conway) RenderStats() string

func (*Conway) Reset

func (c *Conway) Reset()

func (*Conway) ResetView

func (c *Conway) ResetView()

func (*Conway) Scroll

func (c *Conway) Scroll(d Direction, speed int)

func (*Conway) Update

func (c *Conway) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Conway) View

func (c *Conway) View() string

type Direction

type Direction uint8
const (
	DirUp Direction = iota
	DirLeft
	DirDown
	DirRight
)

type Mode

type Mode uint8
const (
	ModeSmart Mode = iota
	ModePlace
	ModeErase
)

Jump to

Keyboard shortcuts

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