sudoku

package
v0.0.0-...-d0944d3 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Empty int = -127

Variables

This section is empty.

Functions

func CheckBoxValidity

func CheckBoxValidity(box int) error

func CheckRowAndColumnValidity

func CheckRowAndColumnValidity(row int, column int) error

Types

type Cell

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

func NewCell

func NewCell(row int, column int) (*Cell, error)

func (*Cell) AddPencilMark

func (c *Cell) AddPencilMark(pencil_mark int) error

func (*Cell) AddPencilMarks

func (c *Cell) AddPencilMarks(pencil_marks []int) error

func (*Cell) Equals

func (c *Cell) Equals(other *Cell) bool

func (*Cell) GetBoxId

func (c *Cell) GetBoxId() int

func (*Cell) GetColumnId

func (c *Cell) GetColumnId() int

func (*Cell) GetPencilMarks

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

func (*Cell) GetRowId

func (c *Cell) GetRowId() int

func (*Cell) GetValue

func (c *Cell) GetValue() int

func (*Cell) RemovePencilMark

func (c *Cell) RemovePencilMark(pencil_mark int) error

func (*Cell) RemovePencilMarks

func (c *Cell) RemovePencilMarks(pencil_marks []int) error

func (*Cell) SetValue

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

type Grid

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

func NewGrid

func NewGrid() *Grid

func (*Grid) Equals

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

func (*Grid) GetAllCells

func (g *Grid) GetAllCells() [81]*Cell

func (*Grid) GetCell

func (g *Grid) GetCell(row int, column int) (*Cell, error)

func (*Grid) GetCellsInBox

func (g *Grid) GetCellsInBox(box int) ([9]*Cell, error)

func (*Grid) GetCellsInColumn

func (g *Grid) GetCellsInColumn(column int) ([9]*Cell, error)

func (*Grid) GetCellsInRow

func (g *Grid) GetCellsInRow(row int) ([9]*Cell, error)

func (*Grid) GetSets

func (g *Grid) GetSets() [27]*Set

func (*Grid) LoadPrettyString

func (g *Grid) LoadPrettyString(pretty_string string) error

type Set

type Set struct {
	Orientation string
	Index       int
	Cells       [9]*Cell
}

Jump to

Keyboard shortcuts

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