Documentation ¶
Index ¶
Constants ¶
View Source
const ( VeryEasy = 20 Easy = 25 Medium = 35 Hard = 45 VeryHard = 50 Expert = 60 )
Difficulties for grid generation. A difficulty level represents how many cells to clear from a fully filled grid.
Variables ¶
View Source
var UnsolvableError = errors.New("Grid is unsolvable")
UnsolvableError is a sentinal error indicating that the grid could not be solved.
Functions ¶
This section is empty.
Types ¶
type Difficulty ¶
type Difficulty int
type Grid ¶
type Grid [9][9]uint8
A Grid is a 9x9 sudoku grid state. Grid implements the Stringer interface for pretty printing.
func GenerateGrid ¶
func GenerateGrid(d Difficulty) *Grid
GenerateGrid returns a randomly initialized Sudoku grid for a given Difficulty.
Click to show internal directories.
Click to hide internal directories.