Expand description
The puzzle-family generator contract.
Sudoku and futoshiki generate by the same three beats — seed a full
solution, place clue furniture, then uniqueness-checked hole-dig — and
diverge only where PuzzleClass names seams. The trait is the intersection
their two generators already satisfy, drawn so one generic dealer can drive
both; T4-W13’s generate_by_digging<C: PuzzleClass> is that dealer, and a
third family (Thermo/Killer/KenKen) ships as one impl of this trait plus a
payload builder, no new generator.
Re-exports§
pub use crate::puzzles::sudoku::rng::SimpleRng;
Traits§
- Puzzle
Class - The generator contract a puzzle family satisfies so one generic hole-digging dealer deals them all.
Functions§
- generate_
by_ digging - The generic hole-digging dealer, driven entirely through
PuzzleClass— the three shared beats every family generates by: seed a full solution, place clue furniture, then dig blanks while amax_solutions: 2re-solve keeps the board unique (a removal that admits a second solution is reverted). One seededrngthreads seed → clues → dig.