Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cell ¶
type Cell struct {
// contains filtered or unexported fields
}
type Grid ¶
type Grid struct {
// contains filtered or unexported fields
}
func LoadGridsFromFile ¶
func ParseSingleGrid ¶
public for testing purposes, and because a pure parsing function is useful to have TODO - potentially move functions for loading from a file into a separate package?
func SolveWithBacktracking ¶
public entrypoint, validating input and wrapping attemptBacktrackingSolve()
func (*Grid) IsCompletelyFilled ¶
func (*Grid) IsValidSolution ¶
checks if each row, column, and box has exactly one of each digit/element only checks completely filled-out grids; if a grid has any empty cells, this returns false does *not* check if a grid matches a specific challenge (i.e. whether it matches the givens from the challenge)
type Puzzle ¶
type Puzzle struct {
// contains filtered or unexported fields
}
TODO - not sure if I want to export the Puzzle type It's currently exported because gopls won't allow renaming it to "puzzle" due to potentially shadowing parameter names this might be a gopls bug - see https://github.com/golang/go/issues/66150