sudoku

package
v0.0.0-...-8eea285 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFixed           = errors.New("original sudoku digits are fixed")
	ErrDupeRow         = errors.New("duplicate digit in row")
	ErrDupeCol         = errors.New("duplicate digit in column")
	ErrDupeSubReg      = errors.New("duplicate digit in subregion")
	ErrCoordOutOfRange = errors.New("row, and/or column is not between 0 and 8, inclusive")
	ErrDigitOutOfRange = errors.New("digit is not between 1 and 9, inclusive")
)

Functions

This section is empty.

Types

type Sudoku

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

func New

func New(startingDigits [9][9]int8) *Sudoku

func (*Sudoku) ClearDigit

func (s *Sudoku) ClearDigit(row, col int8) error

func (*Sudoku) PrintBoard

func (s *Sudoku) PrintBoard()

func (*Sudoku) SetDigit

func (s *Sudoku) SetDigit(row, col, digit int8) error

Jump to

Keyboard shortcuts

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