gosudokusolver

package module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sudoku

type Sudoku struct {
	Height       int
	Width        int
	SquareHeight int
	SquareWidth  int

	IterationsToSolve int
	Input             []int
	Current           []int
	DebugMode         bool
}

func NewSudoku

func NewSudoku(
	h, w, sh, sw int,
	in []int,
	debugMode bool,
) *Sudoku

func (*Sudoku) IsSafe

func (s *Sudoku) IsSafe(numIdx, num int) bool

func (*Sudoku) IsSafeCol added in v1.0.3

func (s *Sudoku) IsSafeCol(numIdx, num int) bool

func (*Sudoku) IsSafeRow added in v1.0.3

func (s *Sudoku) IsSafeRow(numIdx, num int) bool

func (*Sudoku) IsSafeSquare added in v1.0.3

func (s *Sudoku) IsSafeSquare(numIdx, num int) bool

func (*Sudoku) Iterate

func (s *Sudoku) Iterate() bool

func (*Sudoku) Solve

func (s *Sudoku) Solve() error

func (*Sudoku) String

func (s *Sudoku) String() string

Jump to

Keyboard shortcuts

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