cmd

package
v0.0.0-...-f175000 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INIT clientState = iota
	GAME
	OVER
)

Variables

View Source
var (
	Color      = termenv.EnvColorProfile().Color
	RedStyle   = termenv.Style{}.Foreground(Color("1")).Styled
	GreenStyle = termenv.Style{}.Foreground(Color("2")).Styled

	P1Style = termenv.Style{}.Foreground(Color("11")).Styled
	P2Style = termenv.Style{}.Foreground(Color("13")).Styled
)

Functions

func DebugWidget

func DebugWidget(m DebugModel) string

func LogsWidget

func LogsWidget(m LoggedModel, tail int) string

Types

type Client

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

func NewClient

func NewClient(serverAddr string, logger g.Logger, dbg bool) *Client

func (*Client) Run

func (c *Client) Run() error

type DebugModel

type DebugModel interface {
	tea.Model
}

type LoggedModel

type LoggedModel interface {
	GetLogs() []string
}

type Srv

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

func NewServer

func NewServer(game *g.Game, logger g.Logger, dbg bool) *Srv

func (*Srv) Run

func (s *Srv) Run() error

func (*Srv) String

func (s *Srv) String() string

Jump to

Keyboard shortcuts

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