simon-git: puzzles (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Mon Sep 4 20:08:34 BST 2017
TL;DR:
afc2134 Mines: show the number of safe squares left, if it's small.
Repository: https://git.tartarus.org/simon/puzzles.git
On the web: https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2017-09-04 20:08:34
commit afc2134d26ef3bf05852b3e4413565becc1f0b1e
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=afc2134d26ef3bf05852b3e4413565becc1f0b1e;hp=9d89550a75393723c5937559fa86a434de4a77f0
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Sep 4 19:50:43 2017 +0100
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 | 43 ++++++++++++++++++++++++++++++++++++++++---
1 file changed, 40 insertions(+), 3 deletions(-)
More information about the tartarus-commits
mailing list