From 73d8afc8d319196688128e73ba2bb0e3a52fa28b Mon Sep 17 00:00:00 2001 From: ddidderr Date: Sat, 25 Apr 2026 21:05:31 +0200 Subject: [PATCH] docs: add hard Sudoku example Transcribe the hard 9x9 Sudoku puzzle from the provided image into the plain-text example format accepted by the solver. The new example gives users a ready-made input file for manual CLI checks. Document the example directory in the README project decomposition and include a command showing how to run the solver against this puzzle. Test Plan: - cargo run -- sudoku-examples/hard.sudoku Refs: none --- README.md | 8 ++++++++ sudoku-examples/hard.sudoku | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 sudoku-examples/hard.sudoku diff --git a/README.md b/README.md index 05973f8..f84b927 100644 --- a/README.md +++ b/README.md @@ -25,12 +25,20 @@ The grid width must equal the grid height, and the size must have square blocks. That supports layouts such as 4x4 with 2x2 blocks, 9x9 with 3x3 blocks, and 16x16 with 4x4 blocks. +Example puzzles live in `sudoku-examples/`. For instance: + +```sh +cargo run -- sudoku-examples/hard.sudoku +``` + ## Project Decomposition - Command-line interface: `src/main.rs` - Parses the `./sudoku-ai ` argument shape. - Reads puzzle text from disk. - Prints the solved grid or a user-facing error. +- Example puzzles: `sudoku-examples/` + - Stores reusable plain-text Sudoku inputs for manual solver checks. - Solver library: `src/lib.rs` - Plain-text parser - Ignores blank lines. diff --git a/sudoku-examples/hard.sudoku b/sudoku-examples/hard.sudoku new file mode 100644 index 0000000..ccf959f --- /dev/null +++ b/sudoku-examples/hard.sudoku @@ -0,0 +1,9 @@ +1 0 0 0 3 4 0 0 8 +0 7 0 6 8 0 0 3 0 +0 0 8 2 1 0 7 0 4 +0 5 4 0 9 0 6 8 0 +9 1 0 5 0 8 0 2 0 +0 8 0 3 0 0 0 0 5 +3 0 5 9 0 6 8 7 1 +0 0 6 0 0 0 0 4 0 +0 0 1 0 7 0 2 0 0