Aha! It turns out, after a bit of failure-mode profiling, that when
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 31 May 2005 18:09:28 +0000 (18:09 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 31 May 2005 18:09:28 +0000 (18:09 +0000)
commita174a940152f6a7e8e4a4d33ab6799a9bdd8ccb5
treeb0c6b49f3e80e6c6712418f8ab9d1ff6f9329ffd
parent8586183cb0df975491d0c9aba1fb084c39f4f0f4
Aha! It turns out, after a bit of failure-mode profiling, that when
the Mines unique grid generator fails at high mine densities it is
_almost always_ for the same reason, and it also turns out that this
reason is one which can be addressed. So here's an enhancement to
mineperturb() which enables Mines to generate a grid at (as far as I
can tell) any mine density you like, up to and including w*h-9
mines. At densities of 1 in 2 or thereabouts the grids start to look
rather strange, but it can at least generate them without hanging.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@5885 cda61777-01e9-0310-a592-d414129be87e
mines.c