chiark / gitweb /
Mines: show the number of safe squares left, if it's small.
authorSimon Tatham <anakin@pobox.com>
Mon, 4 Sep 2017 18:50:43 +0000 (19:50 +0100)
committerSimon Tatham <anakin@pobox.com>
Mon, 4 Sep 2017 18:50:43 +0000 (19:50 +0100)
commitafc2134d26ef3bf05852b3e4413565becc1f0b1e
treeb6d0067a490d685f885eb98e00d8fd1310ff4b45
parent9d89550a75393723c5937559fa86a434de4a77f0
Mines: show the number of safe squares left, if it's small.

This is intended to make life easier for the _really_ dense grids in
which the generator algorithm falls back to a bare clearing, a tightly
packed section round the edges, and a fringe of deductions required in
between.

In that situation, you can deduce _in principle_ from the remaining-
mines counter that there are (say) one, or two, squares left to be
uncovered before everything remaining has to be a mine. And often the
game will require that deduction in order to solve it all by pure
logic. But actually doing it requires counting up the huge number of
covered squares in an irregularly shaped area and subtracting the mine
count in the status line, which is a real pain.

In fact, people failing to do that are the biggest source of (wrong)
bug reports about Mines games having no solution, so with any luck
this will make my own life easier.
mines.c