Commit graph

6 commits

Author SHA1 Message Date
07437890c9
feat(grid): implement cell random generation
Prefer filled over empty cells when generating them randomly because it
makes the game more fun.
2024-12-07 18:02:13 +01:00
46e15af8d7
build: add rand 0.8.5 dependency
The goal is to depend on crates packaged by Debian and only require more
if necessary.
2024-12-07 18:00:26 +01:00
0b44a2e50d
fix(grid): derive partialeq for cell and grid 2024-12-07 18:00:03 +01:00
9630ee6cf4
fix(grid): expose hints method publicly 2024-12-07 17:59:13 +01:00
dae5e54943
refacto: rename core to grid 2024-12-07 17:58:10 +01:00
140e75cf71
feat: implement basic grid representation
This representation allows defining a grid of cells that are marked
either as filled or empty. This usually represents the solution that the
player has to achieve.

The transpose function is a bit overkill but does the work for now.
Future optimization might be necessary.

Most nonogram puzzles are small, maybe they can live on the stack
instead of dynamically allocating [`Vec`]? Maybe use `smallvec`?
2024-12-01 22:18:48 +01:00