pub fn generate_board(num_clues: usize) -> Result<Board, RustokuError>Expand description
Generates a new Sudoku puzzle with a unique solution.
The num_clues parameter specifies the desired number of initially
filled cells (clues) in the generated puzzle. Fewer clues generally
result in a harder puzzle. The actual number of clues may be slightly
more than num_clues if it’s impossible to remove more numbers
while maintaining a unique solution.
§Example
Generate a puzzle with 30 clues:
use rustoku_lib::generate_board;
let puzzle = generate_board(30).unwrap();
assert_eq!(puzzle.cells.len(), 9);
assert_eq!(puzzle.cells[0].len(), 9);