Commit Graph

2 Commits

Author SHA1 Message Date
Brian Fertig d27244ac60 Rework Pipe Puzzle to branching network with no-leak win condition
Replace the single Hamiltonian-path model with a spanning-tree + extra-edges
approach that produces boards full of T-pieces, crosses and dead ends. The
win condition is now simply "zero leaks" — every socket matched to a
neighbour that opens back — instead of requiring one continuous path from
faucet to drain.

Key changes:
- Logic: generate puzzles via randomized Kruskal spanning tree plus tunable
  extra edges per difficulty; add bitCount, countLeaks, and derived
  angleFor/canonical rotation table
- Art: new tile textures for stub (dead end), T-piece, and cross;
  tileKeyFor and angleFor now handle all five piece types
- Game: faucet and drain are fixed anchors (not rotatable); removed the
  CONNECTED counter in favour of a simpler LEAKS stat; updated difficulty
  tiers (6×6 through 10×10) with extra-edge counts; improved water
  rendering contrast
- Tests: rewrite verify script for the new generation model (spanning tree,
  connectivity, piece mix, no-leak solution); update smoke test to skip
  anchor tiles
- Tutorial: updated rules, board reading guide, and tips for the branching
  network variant
2026-08-24 21:04:27 -06:00
Brian Fertig 518818dc1b Add Pipe Puzzle game with Hamiltonian path generation and procedural tile art 2026-08-24 19:42:16 -06:00