chiark / gitweb /
Add hinting feature to Fifteen (press 'h' for a hint).
authorJonas Kölker <jonaskoelker@yahoo.com>
Thu, 8 Oct 2015 10:20:15 +0000 (12:20 +0200)
committerSimon Tatham <anakin@pobox.com>
Wed, 14 Oct 2015 19:29:32 +0000 (20:29 +0100)
commit12fabc4add608622da87096bb3bed586efee10d9
tree66c37c02bc78a2977808b43ca43f0d49b66eb42b
parent5ddb011a57be24f4d3474c497e57e7c22f979106
Add hinting feature to Fifteen (press 'h' for a hint).

This is really an incremental solver. It alternates between solving
rows and solving columns. Each row and column is solved one piece at
a time. Except for some temporary trickery with the last two pieces
in a row or column, once a piece is solved it is never moved again.

(On non-square grids it first solves some rows or some columns until
the unsolved part is a square, then starts alternating.)
fifteen.c
puzzles.but