[][src]Module sudoku_variants::generator

This module contains logic for generating random Sudoku.

Generation of Sudoku puzzles is done by first generating a full grid with a Generator and then removing some clues using a Reducer.

Structs

Generator

A generator randomly generates a full Sudoku, that is, a Sudoku with no missing digits. It uses a random number generator to decide the content. For most cases, sensible defaults are provided by Generator::new_default.

Reducer

A reducer can be applied to the output of a Generator to remove numbers from the grid as long as it is still uniquely solveable using the provided Solver. This may be intentionally suboptimal to control the difficulty. A random number generator decides which digits are removed.