picrossh.asm$B990 · car.bin

picrossh

A nonogram (picross) puzzle game for the terminal, written in Rust with ratatui. Thirteen hand-made puzzles, all checked to be solvable by line logic alone.

coverpicrossh mid-game on a 10x10 puzzle: the top five rows of a heart filled in teal, empty rows crossed out, and the cursor partway through row six.
picrossh mid-game on a 10x10 puzzle: the top five rows of a heart filled in teal, empty rows crossed out, and the cursor partway through row six.
README.mdpicrossh/index.mdx

Nonograms are grids with number clues on each row and column; each clue is the lengths of the filled runs in that line. You fill cells until the picture appears. picrossh is a small, complete version of that in a terminal window.

How it plays

  • Move with arrows or hjkl, jump five cells with the shifted versions, and use g, G, 0 and $ to reach the edges.
  • Space fills, e erases, x crosses out. Holding a key while moving paints a run.
  • Puzzles are grouped by size in the menu, and their names stay hidden until you solve them.
Size Puzzles
5×5 Plus, Hourglass, Diamond, Steps, Z Shape
10×10 House, Heart, Arrow, Letter T, Ladder
15×15 Frame, Big Cross, H Letter

No guessing

Each puzzle is stored as its solution, and the clues are derived from it. A small line solver then checks the whole set. For each row and column it computes the leftmost and rightmost valid placements of the clue runs given what’s already known. Any cell that lands in the same run in both placements has to be filled, and any cell no run can reach has to be empty. The solver sweeps rows and columns until nothing changes. A test asserts that every preset resolves completely this way, so none of them needs trial and error.

A second binary, export_non, writes the puzzles out in the NON text format so other nonogram tools can read them.

Running it

git clone https://github.com/sadovsky/picrossh.git
cd picrossh
cargo run --release