view

package
v0.0.0-...-504eef9 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewScreen

func NewScreen() tcell.Screen

Types

type ScreenEventSource

type ScreenEventSource interface {
	ChannelEvents(ch chan<- tcell.Event, quit <-chan struct{})
	Fini()
}

type View

type View interface {
	Draw()
	HandleResizeEvent()
	ToggleShowVersion()
	HandleButton1PressEvent(
		x, y int,
		eventTime time.Time,
	)
}

func NewView

func NewView(
	screen tcell.Screen,
	model model.TetrisModel,
) View

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳