ui

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package ui specifies custom controls for tview to assist in playing Go in the terminal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoBoardUI

type GoBoardUI struct {
	Box        *tview.Box
	BoardState *api.BoardState
	// contains filtered or unexported fields
}

func NewGoBoard

func NewGoBoard(app *tview.Application, c *config.Config, hint *tview.TextView) *GoBoardUI

func (*GoBoardUI) Close

func (g *GoBoardUI) Close()

func (*GoBoardUI) Connect

func (g *GoBoardUI) Connect(gameID int64)

func (*GoBoardUI) MoveSelection

func (g *GoBoardUI) MoveSelection(h, v int)

func (*GoBoardUI) PlayMove

func (g *GoBoardUI) PlayMove(x, y int)

func (*GoBoardUI) ResetSelection

func (g *GoBoardUI) ResetSelection()

func (*GoBoardUI) SelectedTile

func (g *GoBoardUI) SelectedTile() *api.BoardPos

func (*GoBoardUI) SetConfig

func (g *GoBoardUI) SetConfig(c *config.Config)

Jump to

Keyboard shortcuts

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