terminal

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BLACK = iota
	RED
	GREEN
	YELLOW
	BLUE
	MAGENTA
	CYAN
	WHITE
)

Color codes

Variables

This section is empty.

Functions

func HideCursor

func HideCursor()

func ReadInput

func ReadInput(inputChan chan string)

func ResetTerminal

func ResetTerminal(state *term.State)

func SetupTerminal

func SetupTerminal() *term.State

func ShowCursor

func ShowCursor()

Types

type Screen

type Screen struct {
	Width      int
	Height     int
	GameWidth  int
	GameHeight int
	OffSetX    int
	OffSetY    int
}

func (*Screen) ClearScreen

func (s *Screen) ClearScreen()

func (*Screen) DrawEndScreen

func (s *Screen) DrawEndScreen(text string, color uint8)

func (*Screen) DrawFrame

func (s *Screen) DrawFrame()

func (*Screen) DrawPause

func (s *Screen) DrawPause()

func (*Screen) DrawRune

func (s *Screen) DrawRune(p game.Position, r rune, color uint8)

func (*Screen) DrawScore

func (s *Screen) DrawScore(score int)

func (*Screen) ErasePause

func (s *Screen) ErasePause()

func (*Screen) EraseRune

func (s *Screen) EraseRune(p game.Position)

func (*Screen) New

func (s *Screen) New(gameWidth, gameHeight int) error

Jump to

Keyboard shortcuts

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