grid

package
v0.0.0-...-64f6b1a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

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

func (*Block) Cells

func (b *Block) Cells() [3][3]*Cell

func (*Block) GetAllowedVals

func (b *Block) GetAllowedVals() []int

func (*Block) GetVals

func (b *Block) GetVals() []int

type Cell

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

func (*Cell) GetAllowedVals

func (c *Cell) GetAllowedVals() []int

func (*Cell) GetBlock

func (c *Cell) GetBlock() *Block

func (*Cell) GetColumn

func (c *Cell) GetColumn() *Column

func (*Cell) GetRow

func (c *Cell) GetRow() *Row

func (*Cell) GetVals

func (c *Cell) GetVals() []int

func (*Cell) GetValue

func (c *Cell) GetValue() *int

func (*Cell) SetValue

func (c *Cell) SetValue(v int) error

func (*Cell) UnsetValue

func (c *Cell) UnsetValue()

type Column

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

func (*Column) Cells

func (c *Column) Cells() [9]*Cell

func (*Column) GetAllowedVals

func (c *Column) GetAllowedVals() []int

func (*Column) GetVals

func (c *Column) GetVals() []int

type ExtendedCell

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

func NewExtendedCell

func NewExtendedCell(c *Cell) *ExtendedCell

func (*ExtendedCell) GetAllowedValues

func (ec *ExtendedCell) GetAllowedValues() []int

func (*ExtendedCell) GetCell

func (ec *ExtendedCell) GetCell() *Cell

func (*ExtendedCell) GetNumAllowedValued

func (ec *ExtendedCell) GetNumAllowedValued() int

func (*ExtendedCell) IsUsed

func (ec *ExtendedCell) IsUsed() bool

func (*ExtendedCell) Update

func (ec *ExtendedCell) Update()

type ExtendedGrid

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

func NewExtendedGrid

func NewExtendedGrid(g *Grid) *ExtendedGrid

func (*ExtendedGrid) Clone

func (eg *ExtendedGrid) Clone() *ExtendedGrid

func (*ExtendedGrid) GetAllowedCount

func (eg *ExtendedGrid) GetAllowedCount() int

func (*ExtendedGrid) GetFreeCount

func (eg *ExtendedGrid) GetFreeCount() int

func (*ExtendedGrid) GetGrid

func (eg *ExtendedGrid) GetGrid() *Grid

func (*ExtendedGrid) GetSEC

func (eg *ExtendedGrid) GetSEC() []*ExtendedCell

func (*ExtendedGrid) SetNull

func (eg *ExtendedGrid) SetNull()

func (*ExtendedGrid) UpdateAll

func (eg *ExtendedGrid) UpdateAll()

func (*ExtendedGrid) UpdateN

func (eg *ExtendedGrid) UpdateN()

func (*ExtendedGrid) UpdateSec

func (eg *ExtendedGrid) UpdateSec()

type Grid

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

func NewGrid

func NewGrid() *Grid

func (*Grid) AllCells

func (g *Grid) AllCells() []*Cell

func (*Grid) Blocks

func (g *Grid) Blocks() [3][3]*Block

func (*Grid) Cells

func (g *Grid) Cells() [9][9]*Cell

func (*Grid) CheckSolved

func (g *Grid) CheckSolved() bool

func (*Grid) Clone

func (g *Grid) Clone() *Grid

func (*Grid) Cols

func (g *Grid) Cols() [9]*Column

func (*Grid) Equals

func (g *Grid) Equals(o *Grid) bool

func (*Grid) GetNumFree

func (g *Grid) GetNumFree() int

func (*Grid) GetSortedExtendedCells

func (g *Grid) GetSortedExtendedCells(used bool) []*ExtendedCell

func (*Grid) Print

func (g *Grid) Print()

func (*Grid) Rows

func (g *Grid) Rows() [9]*Row

func (*Grid) ToString

func (g *Grid) ToString() string

type Row

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

func (*Row) Cells

func (r *Row) Cells() [9]*Cell

func (*Row) GetAllowedVals

func (r *Row) GetAllowedVals() []int

func (*Row) GetVals

func (r *Row) GetVals() []int

Jump to

Keyboard shortcuts

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