app

package
v0.0.0-...-f20979a Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cntrl

type Cntrl struct {
	Desk DeskInterface
}

Cntrl struct

func NewCntrl

func NewCntrl(desk DeskInterface) Cntrl

NewCntrl func

func (*Cntrl) Run

func (c *Cntrl) Run()

Run func

type Desk

type Desk struct {
	Desk        [][]int
	Size        int
	ColorWriter text.ColorDigitInterface
}

Desk struct

func NewDesk

func NewDesk(size int, colorWriter text.ColorDigitInterface) Desk

NewDesk func

func (*Desk) AddDigit

func (d *Desk) AddDigit(num int) bool

AddDigit func

func (*Desk) Print

func (d *Desk) Print()

Print func

func (*Desk) Reset

func (d *Desk) Reset()

Reset func

func (*Desk) ShiftDown

func (d *Desk) ShiftDown()

ShiftDown func

func (*Desk) ShiftLeft

func (d *Desk) ShiftLeft()

ShiftLeft func

func (*Desk) ShiftRight

func (d *Desk) ShiftRight()

ShiftRight func

func (*Desk) ShiftTop

func (d *Desk) ShiftTop()

ShiftTop func

type DeskInterface

type DeskInterface interface {
	Print()
	Reset()
	AddDigit(num int) bool
	ShiftLeft()
	ShiftRight()
	ShiftTop()
	ShiftDown()
}

DeskInterface interface

Jump to

Keyboard shortcuts

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