A keyboard-driven terminal puzzle game written in Rust. Place one queen in each colored region of an N×N board so that no two queens share a row, column, or touch each other (including diagonally). Puzzles are procedurally generated with a guaranteed unique solution.
cargo install --git https://github.com/cwalcott/queens-cliRequires Rust stable. A color-capable terminal (256-color or truecolor) is recommended.
queens # 8×8 medium (default)
queens --size 9 # 9×9 board
queens --difficulty hard # hard difficulty
queens -s 6 -d easy # 6×6 easy
queens --seed 1234567 # reproduce a shared puzzle
queens --letters # region letters in cells (colorblind aid)
queens --help # all options- Place exactly one queen per row.
- Place exactly one queen per column.
- Place exactly one queen per colored region.
- No two queens may be king-adjacent (touching, including diagonally).
| Key | Action |
|---|---|
Arrows / h j k l |
Move cursor |
Space / Enter |
Cycle cell: Empty → Mark → Queen → Empty |
x |
Toggle mark (clears a queen) |
| Left / right click | Cycle cell / toggle mark |
a |
Toggle auto-X (dims eliminated cells) |
u |
Undo |
c |
Clear board |
n |
New puzzle (same size & difficulty) |
d |
Cycle difficulty |
[ / ] |
Decrease / increase board size |
? |
Help overlay |
q / Esc |
Quit |
Queens currently in conflict are highlighted in red. Auto-X (on by default) dims cells that are already eliminated by your placed queens — useful for narrowing down where each queen must go.
The win screen shows the puzzle's seed; share it and the board size /
difficulty, and queens --seed <N> reproduces the exact same puzzle.
git clone https://github.com/cwalcott/queens-cli
cd queens-cli
cargo build --release
./target/release/queenscargo test --all-features # run tests
cargo clippy --all-targets --all-features -- -D warnings # lintSPEC.md documents the rules, architecture, generation algorithm,
difficulty grading, and TUI design in full.
MIT — see LICENSE.