logic

package
v0.0.0-...-f966ade Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataGrid

type DataGrid = [4][4]int

type Direction

type Direction = int
const (
	DirectionUp Direction = iota
	DirectionDown
	DirectionLeft
	DirectionRight
)

type Logic

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

func New

func New() *Logic

func (*Logic) Data

func (l *Logic) Data() DataGrid

func (*Logic) DebugDisplay

func (l *Logic) DebugDisplay()

func (*Logic) FormattedScore

func (l *Logic) FormattedScore() string

func (*Logic) IsGameOver

func (l *Logic) IsGameOver() bool

func (*Logic) MoveAndGenerate

func (l *Logic) MoveAndGenerate(direction Direction)

func (*Logic) View

func (l *Logic) View() ViewGrid

type ViewGrid

type ViewGrid = [4][4]string

Jump to

Keyboard shortcuts

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