Module core

Source
Expand description

Core module for the Rustoku solver and generator.

This module includes the Rustoku struct for representing and solving Sudoku puzzles using backtracking and Minimum Remaining Values (MRV). It provides functionality for solving puzzles and checking solutions.

This module also includes a function to generate new Sudoku puzzles with a specified number of clues, ensuring that the generated puzzle has a unique solution.

Structs§

Board
Raw 9x9 board with some useful helpers.
Candidates
Represents the candidates cache for a Rustoku puzzle.
Masks
Masks for Rustoku puzzle, representing the state of rows, columns, and boxes.
Rustoku
Solver primitive that uses backtracking and bitmasking for constraints.
Solution
Solved board and its solution path.
SolvePath
Solve path associated with a solution.
TechniqueFlags
Bitflags indicating which human techniques are active/enabled.

Enums§

SolveStep
Single step in the solving process.

Functions§

generate_board
Generates a new Sudoku puzzle with a unique solution.