board

package
v0.0.0-...-f740d71 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(size int) *board

Types

type Board

type Board interface {
	Rows() [][]Cell
	HasSpace() bool
	Moved() bool
	GenerateCell()

	Left()
	Right()
	Up()
	Down()
}

type Cell

type Cell interface {
	Size() CellSize
	Empty() bool
}

type CellSize

type CellSize int
const (
	Empty CellSize = 1 + iota
	CS2
	CS4
	CS8
	CS16
	CS32
	CS64
	CS128
	CS256
	CS512
	CS1024
	CS2048
)

func (CellSize) Stirng

func (s CellSize) Stirng() string

Jump to

Keyboard shortcuts

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