sgt/puzzles
18 years agoNew {en,de}code_ui functions should be static. Oops.
simon [Tue, 28 Jun 2005 17:43:50 +0000 (17:43 +0000)]
New {en,de}code_ui functions should be static. Oops.

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

18 years agoActually implemented the serialise/deserialise functions in
simon [Tue, 28 Jun 2005 17:05:05 +0000 (17:05 +0000)]
Actually implemented the serialise/deserialise functions in
midend.c. Also I've added an experimental front end in gtk.c only:
`Save' and `Load' options on the Game menu, which don't even show up
unless you define the magic environment variable
PUZZLES_EXPERIMENTAL_SAVE. Once I'm reasonably confident that the
whole edifice is plausibly stable, I'll take that out and turn it
into a supported feature (and also implement it in OS X and Windows
and write documentation).

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

18 years agoMore serialisation changes: the game_aux_info structure has now been
simon [Tue, 28 Jun 2005 11:14:09 +0000 (11:14 +0000)]
More serialisation changes: the game_aux_info structure has now been
retired, and replaced with a simple string. Most of the games which
use it simply encode the string in the same way that the Solve move
will also be encoded, i.e. solve_game() simply returns
dupstr(aux_info). Again, this is a better approach than writing
separate game_aux_info serialise/deserialise functions because doing
it this way is self-testing (the strings are created and parsed
during the course of any Solve operation at all).

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

18 years agoRogue diagnostic!
simon [Tue, 28 Jun 2005 08:35:55 +0000 (08:35 +0000)]
Rogue diagnostic!

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

18 years agoMove a rogue declaration to the top of its block.
simon [Tue, 28 Jun 2005 08:06:56 +0000 (08:06 +0000)]
Move a rogue declaration to the top of its block.

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

18 years agoAnother function pair required for serialisation; these ones save
simon [Tue, 28 Jun 2005 07:33:49 +0000 (07:33 +0000)]
Another function pair required for serialisation; these ones save
and restore anything vitally important in the game_ui. Most of the
game_ui is expected to be stuff about cursor positions and currently
active mouse drags, so it absolutely _doesn't_ want to be preserved
over a serialisation; but one or two things would be disorienting or
outright wrong to reset, such as the Net origin position and the
Mines death counter.

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

18 years agoAnnoying special cases for Mines.
simon [Tue, 28 Jun 2005 06:59:27 +0000 (06:59 +0000)]
Annoying special cases for Mines.

Firstly, the `Restart' function now reconstructs an initial game
state from the game description rather than dup_game(states[0]).
This means that Restart in a game of Mines restarts to just _after_
the initial click, so you can resume the puzzle-solving part without
having to remember where you placed that click.

Secondly, the midend now contains a second `private' game desc,
which is guaranteed to actually reconstruct the initial game_state
correctly (which Mines's publicly visible game descs tend not to,
since they describe a state which has already had the first click).
This should make serialising of Mines more sensible.

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

18 years agoRe-architecting of the game backend interface. make_move() has been
simon [Mon, 27 Jun 2005 19:34:54 +0000 (19:34 +0000)]
Re-architecting of the game backend interface. make_move() has been
split into two functions. The first, interpret_move(), takes all the
arguments that make_move() used to get and may have the usual side
effects of modifying the game_ui, but instead of returning a
modified game_state it instead returns a string description of the
move to be made. This string description is then passed to a second
function, execute_move(), together with an input game_state, which
is responsible for actually producing the new state. (solve_game()
also returns a string to be passed to execute_move().)

The point of this is to work towards being able to serialise the
whole of a game midend into a byte stream such as a disk file, which
will eventually support save and load functions in the desktop
puzzles, as well as restoring half-finished games after a quit and
restart in James Harvey's Palm port. Making each game supply a
convert-to-string function for its game_state format would have been
an unreliable way to do this, since those functions would not have
been used in normal play, so they'd only have been tested when you
actually tried to save and load - a recipe for latent bugs if ever I
heard one. This way, you won't even be able to _make_ a move if
execute_move() doesn't work properly, which means that if you can
play a game at all I can have pretty high confidence that
serialising it will work first time.

This is only the groundwork; there will be more checkins to come on
this theme. But the major upheaval should now be done, and as far as
I can tell everything's still working normally.

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

18 years agoFix GTK casts to restore correct compilation on GTK 2.0 after r6022.
simon [Sun, 26 Jun 2005 13:12:34 +0000 (13:12 +0000)]
Fix GTK casts to restore correct compilation on GTK 2.0 after r6022.

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

18 years agoUnder Gtk 1.2 (at least on Debian woody), a config or preset change that would
jacob [Sun, 26 Jun 2005 12:54:08 +0000 (12:54 +0000)]
Under Gtk 1.2 (at least on Debian woody), a config or preset change that would
otherwise not cause the window size to change caused it to become very small
indeed. This change from Simon fixes that behaviour; I haven't tested it with
Gtk 2.

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

18 years agoAdd debugging support.
jacob [Sat, 25 Jun 2005 17:24:03 +0000 (17:24 +0000)]
Add debugging support.

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

18 years agoFurther additions to the Guess docs.
jacob [Sat, 25 Jun 2005 13:52:52 +0000 (13:52 +0000)]
Further additions to the Guess docs.

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

18 years agoMake the keyboard-control cursors visible whenever a keyboard control is
jacob [Sat, 25 Jun 2005 13:43:45 +0000 (13:43 +0000)]
Make the keyboard-control cursors visible whenever a keyboard control is
activated.

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

18 years agoThe AngleArc() function that was being used to draw circles on Windows turns
jacob [Sat, 25 Jun 2005 13:24:19 +0000 (13:24 +0000)]
The AngleArc() function that was being used to draw circles on Windows turns
out to be unsupported on the Win9x/Me series. Use Arc() instead (tested on
Win98 and Win2K).

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

18 years agoCouple of presets.
simon [Fri, 24 Jun 2005 16:35:42 +0000 (16:35 +0000)]
Couple of presets.

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

18 years agoMore patches from James Harvey: enforce a maximum brightness in the
simon [Fri, 24 Jun 2005 16:35:27 +0000 (16:35 +0000)]
More patches from James Harvey: enforce a maximum brightness in the
background colour (to ensure white pegs show up against it), and
convert the keyboard-control cursor into a rectangle when it's over
the hint pegs (otherwise it looks rather silly for numbers of pegs
above 4).

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

18 years agoFix another display/UI glitch which triggered if you filled a row
simon [Fri, 24 Jun 2005 12:30:30 +0000 (12:30 +0000)]
Fix another display/UI glitch which triggered if you filled a row
(so that the hint pegs lit up as `ready') and then pressed Undo: the
markable flag would remain set and the redrawing wouldn't darken the
pegs again.

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

18 years agoTurn off the keyboard-control cursor when the user reverts to mouse
simon [Fri, 24 Jun 2005 11:13:08 +0000 (11:13 +0000)]
Turn off the keyboard-control cursor when the user reverts to mouse
control.

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

18 years agoChange the preprocessor symbol `DEBUG' to `DEBUGGING', since the
simon [Fri, 24 Jun 2005 11:05:43 +0000 (11:05 +0000)]
Change the preprocessor symbol `DEBUG' to `DEBUGGING', since the
former is automatically defined by Cygwin.

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

18 years agoMy background-erasing changes in r5996/r5997 caused trouble with the
simon [Fri, 24 Jun 2005 11:03:20 +0000 (11:03 +0000)]
My background-erasing changes in r5996/r5997 caused trouble with the
keyboard-control cursors, and when I tried to fix those more
wallpaper bubbles popped up elsewhere. Here's what I think is a
proper fix: a comprehensive overhaul of the redraw code such that,
instead of tracking the cursor positions explicitly in the
drawstate, we instead track for each peg position whether or not a
cursor is currently displayed at that position. So cursor erasing
and cursor drawing become part of the main draw loop rather than a
separate bit on the end.

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

18 years agoArray overflow fix from James Harvey.
simon [Thu, 23 Jun 2005 23:11:59 +0000 (23:11 +0000)]
Array overflow fix from James Harvey.

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

18 years agoMake the `hold marker' in Guess accessible from the keyboard (`H' key, for want
jacob [Thu, 23 Jun 2005 22:01:17 +0000 (22:01 +0000)]
Make the `hold marker' in Guess accessible from the keyboard (`H' key, for want
of a better idea).

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

18 years agoFactual and other corrections/additions to the Guess docs.
jacob [Thu, 23 Jun 2005 21:47:55 +0000 (21:47 +0000)]
Factual and other corrections/additions to the Guess docs.

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

18 years agoReinstate WinHelp topic now we have a manual chapter.
jacob [Thu, 23 Jun 2005 21:37:05 +0000 (21:37 +0000)]
Reinstate WinHelp topic now we have a manual chapter.

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

18 years agoCredit James Harvey.
simon [Thu, 23 Jun 2005 19:01:01 +0000 (19:01 +0000)]
Credit James Harvey.

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

18 years agoJames Harvey's extensions to Guess: a couple of extra game settings
simon [Thu, 23 Jun 2005 18:50:58 +0000 (18:50 +0000)]
James Harvey's extensions to Guess: a couple of extra game settings
plus a manual chapter.

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

18 years agoAnd forgot to add guess to the Unix make install target! I need a list.
simon [Thu, 23 Jun 2005 18:05:19 +0000 (18:05 +0000)]
And forgot to add guess to the Unix make install target! I need a list.

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

18 years agoBah, not good enough. Extend those background erases by one more
simon [Thu, 23 Jun 2005 18:02:21 +0000 (18:02 +0000)]
Bah, not good enough. Extend those background erases by one more
pixel.

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

18 years agoErase backgrounds when drawing over an existing circle, for the
simon [Thu, 23 Jun 2005 17:43:43 +0000 (17:43 +0000)]
Erase backgrounds when drawing over an existing circle, for the
benefit of antialiasing platforms such as OS X. Also in this
checkin, fiddle with svn:ignore (there's a new puzzle binary).

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

18 years agoAllow dragging of coloured pegs from previous guesses. Also
simon [Thu, 23 Jun 2005 16:36:09 +0000 (16:36 +0000)]
Allow dragging of coloured pegs from previous guesses. Also
reorganise the colours so there are fewer of those terribly
computery cyan and magenta shades, and more good old-fashioned
colours with simple names like orange and purple. Finally, change
the `right place' marking peg colour from red to black, in line with
at least _my_ old Mastermind set (I faintly suspect red marker pegs
of being an Americanism) and also so that the marker pegs and the
coloured pegs have no colours in common.

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

18 years agoMust outline as well as filling circles, because not all platforms
simon [Thu, 23 Jun 2005 12:55:47 +0000 (12:55 +0000)]
Must outline as well as filling circles, because not all platforms
can be guaranteed to draw bare filled shapes the same way.

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

18 years agoTwo small fixes: add some ceil() calls to stop the puzzle shrinking
simon [Thu, 23 Jun 2005 12:21:14 +0000 (12:21 +0000)]
Two small fixes: add some ceil() calls to stop the puzzle shrinking
every time I press N, and revert the help topic to NULL until some
documentation materialises.

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

18 years ago`Guess', a Mastermind clone from James Harvey. This checkin also
simon [Thu, 23 Jun 2005 09:14:19 +0000 (09:14 +0000)]
`Guess', a Mastermind clone from James Harvey. This checkin also
introduces a few new utility functions in misc.c, one of which is
the bitmap obfuscator from Mines (which has therefore been moved out
of mines.c).

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

18 years agoIntroduce a front-end function to draw circles.
simon [Thu, 23 Jun 2005 08:24:52 +0000 (08:24 +0000)]
Introduce a front-end function to draw circles.

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

18 years agoThis TODO comment should have been taken out in r5913 :-)
simon [Wed, 22 Jun 2005 09:26:03 +0000 (09:26 +0000)]
This TODO comment should have been taken out in r5913 :-)

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

18 years agoNew front end functions to save and restore a region of the puzzle
simon [Wed, 22 Jun 2005 08:30:31 +0000 (08:30 +0000)]
New front end functions to save and restore a region of the puzzle
bitmap. Can be used to implement sprite-like animations: for
example, useful for games that wish to implement a user interface
which involves dragging an object around the playing area.

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

18 years agoAdd WinHelp topic
jacob [Tue, 21 Jun 2005 11:16:36 +0000 (11:16 +0000)]
Add WinHelp topic

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

18 years agoPatch from James Harvey in response to the new Rectangles grid
simon [Tue, 21 Jun 2005 08:15:53 +0000 (08:15 +0000)]
Patch from James Harvey in response to the new Rectangles grid
generator: (a) take out the `#ifdef SLOW_SYSTEM' because the new
generator is much more efficient, and (b) convert another int to
size_t to prevent the solver going negative in 16-bit ints as a
result.

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

18 years agoConversation with Richard and Chris yesterday gave rise to a more
simon [Mon, 20 Jun 2005 17:32:45 +0000 (17:32 +0000)]
Conversation with Richard and Chris yesterday gave rise to a more
sensible means of generating an initial gridful of rectangles. This
was previously a stupidly non-scalable bit of the Rectangles puzzle
generator: it filled a ludicrously large array with every possible
rectangle that could go anywhere in the grid, picked one at random
and winnowed the list by removing anything that overlapped that one,
then repeated until the list was empty (and therefore the grid was
full except for remaining singleton squares). Total cost was O(N^4)
in both time and space; not pretty.

Richard and Chris's sensible alternative was to place each rectangle
by randomly choosing a so-far-uncovered _square_, and then picking a
random rectangle from the possible ones covering that square. This
means we only have to deal with a small fragment of the rectangle
list at any one time, and we don't have to store the whole lot in
memory; so it's _much_ faster and more scalable, and has virtually
no memory cost.

A side effect of this algorithmic change is that the probability
distribution has altered. When you line up all the possible
_rectangles_ and pick one at random, then obviously the small ones
are going to be in the majority since lots of small ones can fit
into the space taken up by any given big one. So the original
algorithm tends to favour fiddly grids full of lots of tiny
rectangles, which don't tend to be very interesting. But if you
first pick a square and then think about the rectangles that can
surround that square, the small ones are suddenly going to be in the
_minority_ because there are only two ways you can place (say) a 2x1
containing a given square compared to 36 ways you can place a 6x6.
So this algorithm favours more large rectangles, which I generally
consider to be an improvement.

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

18 years agoJames Harvey's memory leak patch for Flip.
simon [Sun, 19 Jun 2005 21:49:53 +0000 (21:49 +0000)]
James Harvey's memory leak patch for Flip.

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

18 years agoRedraw glitch: tiles marked black (at game-over time) were not
simon [Sun, 19 Jun 2005 14:33:06 +0000 (14:33 +0000)]
Redraw glitch: tiles marked black (at game-over time) were not
redrawn as non-black on undo. Introduce a new flag TILE_IMPOSSIBLE,
so that information about those black markers is cached in the
drawstate and we know when we have to erase them.

In the process I've removed the game_state argument completely from
the subfunction tile_redraw(), which gives me some confidence that
it isn't getting any _more_ privileged information out of it.

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

18 years agoJust noticed yesterday that initial window sizing is broken on
simon [Sat, 18 Jun 2005 08:52:50 +0000 (08:52 +0000)]
Just noticed yesterday that initial window sizing is broken on
Windows for puzzles with status bars, because the initial call to
check_window_size is given the window size _without_ the status bar
and assumes that that has to be big enough for the whole thing
_with_ the status bar, so it shrinks everything by a little bit. So
now we resize the window to take account of the status bar before
calling check_window_size(), and the problem seems to have gone away.

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

18 years agoI've decided I didn't like the asymmetry of putting the solution
simon [Sat, 18 Jun 2005 08:46:33 +0000 (08:46 +0000)]
I've decided I didn't like the asymmetry of putting the solution
markers in the top left of the square.

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

18 years agoI'm sick of not having a `make install' target.
simon [Sat, 18 Jun 2005 08:36:52 +0000 (08:36 +0000)]
I'm sick of not having a `make install' target.

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

18 years agoCorrect rogue chapter into a subheading.
simon [Fri, 17 Jun 2005 19:06:25 +0000 (19:06 +0000)]
Correct rogue chapter into a subheading.

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

18 years agoSolver for Flip.
simon [Fri, 17 Jun 2005 18:55:36 +0000 (18:55 +0000)]
Solver for Flip.

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

18 years agoInfrastructure change which I've been thinking about for a while:
simon [Fri, 17 Jun 2005 18:54:58 +0000 (18:54 +0000)]
Infrastructure change which I've been thinking about for a while:
the back end function solve_game() now takes the _current_
game_state in addition to the initial one.

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

18 years agoAnimation.
simon [Fri, 17 Jun 2005 17:32:28 +0000 (17:32 +0000)]
Animation.

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

18 years agoAnother new puzzle! This one isn't particularly deep or complex
simon [Fri, 17 Jun 2005 17:16:49 +0000 (17:16 +0000)]
Another new puzzle! This one isn't particularly deep or complex
(solving it only requires matrix inversion over GF(2), whereas
several of the other puzzles in this collection are NP-complete in
principle), but it's a fun enough thing to play with and is
non-trivial to do in your head - especially on the hardest preset.

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

18 years agoAn email conversation with Chuck Fresno turned up several forms of
simon [Fri, 17 Jun 2005 11:51:52 +0000 (11:51 +0000)]
An email conversation with Chuck Fresno turned up several forms of
symmetry which were not implemented in Solo. Now they are.

In the process I've completely retired symmetry_limit() on the
grounds that some of the new symmetries do not have a rectangular
base region; instead I determine the base region by going through
the grid and finding every square which is not transformed into a
lexicographically lower square by any symmetry operation. This means
that adding new symmetries is now _only_ a matter of encoding the
actual transformation rules.

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

18 years agoClean up the behaviour of drags off the edge of the grid. These have
simon [Fri, 10 Jun 2005 13:05:24 +0000 (13:05 +0000)]
Clean up the behaviour of drags off the edge of the grid. These have
always been a convenient way to cancel a drag you decided was an
error, but now it's more obvious that this is the case.

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

18 years agoDisable shuffle overlap checking in the special case w=h=n.
simon [Fri, 10 Jun 2005 11:34:02 +0000 (11:34 +0000)]
Disable shuffle overlap checking in the special case w=h=n.

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

18 years agoOverzealous last-move tracking during shuffle was causing lockups on
simon [Fri, 10 Jun 2005 11:29:59 +0000 (11:29 +0000)]
Overzealous last-move tracking during shuffle was causing lockups on
2x2 grid generation.

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

18 years agoPatch from James Harvey to rearrange the Same Game colours.
simon [Fri, 10 Jun 2005 11:27:26 +0000 (11:27 +0000)]
Patch from James Harvey to rearrange the Same Game colours.

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

18 years agoPatch from Chris Emerson to add a status bar to Rectangles. Apart
simon [Fri, 10 Jun 2005 11:24:44 +0000 (11:24 +0000)]
Patch from Chris Emerson to add a status bar to Rectangles. Apart
from saying `Auto-solved' or `Completed', the main function of the
status bar is to track the current size of a rectangle you're
dragging out, which makes life much easier when trying to count up
large rectangles in 19x19 mode.

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

18 years agoGDK 2.6, in its doubtless infinite wisdom, has decided that
simon [Thu, 9 Jun 2005 18:29:11 +0000 (18:29 +0000)]
GDK 2.6, in its doubtless infinite wisdom, has decided that
gdk_font_from_description() will no longer even _try_ to return a
font matching the specified Pango font description; instead it will
return `fixed' no matter what you do. Therefore, I've had to switch
to using Pango proper for Puzzles text rendering, rather than just
using Pango for font selection.

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

18 years agoRemove debug output.
jacob [Wed, 8 Jun 2005 09:20:35 +0000 (09:20 +0000)]
Remove debug output.

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

18 years agoAdd Windows help topic
jacob [Tue, 7 Jun 2005 21:05:29 +0000 (21:05 +0000)]
Add Windows help topic

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

18 years agoTweaks and more complete documentation for Same Game.
jacob [Tue, 7 Jun 2005 21:03:14 +0000 (21:03 +0000)]
Tweaks and more complete documentation for Same Game.

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

18 years agoInteger overflow in game_size(). Oops.
simon [Tue, 7 Jun 2005 20:44:14 +0000 (20:44 +0000)]
Integer overflow in game_size(). Oops.

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

18 years agoChris Emerson points out that gtk_window_resize() isn't in GTK 1.2.
simon [Tue, 7 Jun 2005 20:25:25 +0000 (20:25 +0000)]
Chris Emerson points out that gtk_window_resize() isn't in GTK 1.2.
Work around it the same way I did in PuTTY.

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

18 years agoJames Harvey's patch to support keyboard control in Same Game.
simon [Tue, 7 Jun 2005 20:22:25 +0000 (20:22 +0000)]
James Harvey's patch to support keyboard control in Same Game.

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

18 years agoForgot to add Same Game to the big list for OS X.
simon [Tue, 7 Jun 2005 20:22:08 +0000 (20:22 +0000)]
Forgot to add Same Game to the big list for OS X.

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

18 years agoJames Harvey (again) points out an array underrun in the new
simon [Tue, 7 Jun 2005 19:07:58 +0000 (19:07 +0000)]
James Harvey (again) points out an array underrun in the new
clash-checking code in Solo. (valgrind confirms it.)

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

18 years agoAnother James Harvey patch. This one introduces a new button code
simon [Tue, 7 Jun 2005 19:04:52 +0000 (19:04 +0000)]
Another James Harvey patch. This one introduces a new button code
called `CURSOR_SELECT', intended for platforms which have a fire
button to go with their cursor keys. (Apparently some Palms do.)
CURSOR_SELECT is not bound to anything on any of the current three
platforms, and therefore no game may rely on it being available.
This checkin adds it in Net as a synonym for 'a', the keyboard-based
rotate-left command.

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

18 years agoJames Harvey has contributed an implementation of `Same Game', also
simon [Tue, 7 Jun 2005 19:01:36 +0000 (19:01 +0000)]
James Harvey has contributed an implementation of `Same Game', also
known as ksame (KDE) and Same GNOME (GNOME).

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

18 years agoAll the games in this collection have always defined their graphics
simon [Tue, 7 Jun 2005 17:57:50 +0000 (17:57 +0000)]
All the games in this collection have always defined their graphics
in terms of a constant TILE_SIZE (or equivalent). Here's a
surprisingly small patch which switches this constant into a
run-time variable.

The only observable behaviour change should be on Windows, which
physically does not permit the creation of windows larger than the
screen; if you try to create a puzzle (Net makes this plausible)
large enough to encounter this restriction, the Windows front end
should automatically re-adjust the puzzle's tile size so that it
does fit within the available space.

On GTK, I haven't done this, on the grounds that X _does_ permit
windows larger than the screen, and many X window managers already
provide the means to navigate around such a window. Gareth said he'd
rather navigate around a huge Net window than have it shrunk to fit
on one screen. I'm uncertain that this makes sense for all puzzles -
Pattern in particular strikes me as something that might be better
off shrunk to fit - so I may have to change policy later or make it
configurable.

On OS X, I also haven't done automatic shrinkage to fit on one
screen, largely because I didn't have the courage to address the
question of multiple monitors and what that means for the entire
concept :-)

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

18 years agoIntroduce a new game backend function (there seem to have been a lot
simon [Mon, 6 Jun 2005 11:21:36 +0000 (11:21 +0000)]
Introduce a new game backend function (there seem to have been a lot
of these recently) whose job is to update a game_ui to be consistent
with a new game_state. This is called by midend.c in every situation
where the current game_state changes _other_ than as a result of
make_move (Undo, Redo, Restart, Solve).

The introduction of this function allows a game_ui to contain
information about selections or highlights within a game_state which
simply wouldn't make sense when transferred to another game_state.
In particular, I've used it to fix a subtle bug in Solo whereby,
although you couldn't right-click to pencil-mode highlight a filled
square, you could _get_ a pencil-mode highlight in a filled square
if you used Undo and Redo. (Undo to before the square was filled,
right-click to highlight it, then Redo. Alternatively, left-click
and clear the square, right-click to highlight it, then Undo.)

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

18 years agoSmall UI bug: LEFT_RELEASEs were being thrown away completely if
simon [Sat, 4 Jun 2005 17:51:49 +0000 (17:51 +0000)]
Small UI bug: LEFT_RELEASEs were being thrown away completely if
their coordinates were outside the playing area. Clearly no actual
move should be made in that situation, but we do at least need to
sort out any highlighted squares from the prior dragging operations.

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

18 years agoRevamp pencil mark placement and sizing. Pencil marks are now sized
simon [Sat, 4 Jun 2005 12:32:40 +0000 (12:32 +0000)]
Revamp pencil mark placement and sizing. Pencil marks are now sized
and positioned according to how many there are in the cell, rather
than how many distinct digits there are in the entire puzzle. This
means that 4x4 Solo can now be played with pencil marks without
_too_ much difficulty; the marks will still get a bit crowded if you
have more than 12 in the same square, but with luck that shouldn't
happen often, and as long as you're down in the 2-9 range things
should be entirely legible.

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

18 years agoJames Harvey requested that puzzles not use DEBUG as a preprocessor
simon [Sat, 4 Jun 2005 09:59:03 +0000 (09:59 +0000)]
James Harvey requested that puzzles not use DEBUG as a preprocessor
symbol for enabling diagnostics, presumably because in his Palm port
it means something else as well. He sent this patch to switch Net
and Netslide over to using GENERATION_DIAGNOSTICS, in the fashion of
the newer games.

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

18 years agoColin Watson suggests that Alt-click (or Option-click) could
simon [Fri, 3 Jun 2005 12:27:29 +0000 (12:27 +0000)]
Colin Watson suggests that Alt-click (or Option-click) could
usefully be equivalent to right-clicking on platforms other than OS
X; in particular, it's useful if you're running Linux on Apple
hardware such as PowerBook which inherently has only one button. So
here's the fix for GTK, and Windows as well (the latter for
completeness and consistency, not because I can actually think of
any reason somebody might be running Windows on one-button
hardware).

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

18 years agoUnique solubility in Mines means that you can massively increase the
simon [Fri, 3 Jun 2005 12:10:32 +0000 (12:10 +0000)]
Unique solubility in Mines means that you can massively increase the
mine density without (as you would with a conventional random grid
generator) rendering the game completely unplayable. High mine
densities are really good fun, and the point of the presets menu is
to provide people with pre-tested good settings and things they
might not have thought to try for themselves; so here are three
additional presets with high densities.

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

18 years agoAdd mines and mineobfusc to the ignore property.
simon [Fri, 3 Jun 2005 08:38:24 +0000 (08:38 +0000)]
Add mines and mineobfusc to the ignore property.

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

18 years agoStandalone compilation mode which turns mines.c into a little
simon [Thu, 2 Jun 2005 16:34:37 +0000 (16:34 +0000)]
Standalone compilation mode which turns mines.c into a little
utility to convert descriptive game IDs containing mine bitmaps
between obfuscated and cleartext. Might be handy for anyone planning
to design custom levels to send to friends (mines spelling out
`Happy Birthday', that sort of thing), as someone suggested to me
today :-)

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

18 years agoFix various departures from C found by `gcc -ansi -pedantic'. I
simon [Thu, 2 Jun 2005 08:14:14 +0000 (08:14 +0000)]
Fix various departures from C found by `gcc -ansi -pedantic'. I
haven't checked in Makefile changes to enable this, but I'll at
least fix the specific problems it found when enabled as a one-off.

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

18 years agomin()/max() macros conflict with ones defined by Windows (or at least MinGW)
jacob [Wed, 1 Jun 2005 22:56:20 +0000 (22:56 +0000)]
min()/max() macros conflict with ones defined by Windows (or at least MinGW)
headers; but MIN()/MAX() conflict with glib. Let's keep the lower-case ones,
and assume that any provided by the system have the obvious semantics.

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

18 years agoFix Richard's patch so that it's actually C :-/
simon [Wed, 1 Jun 2005 18:57:28 +0000 (18:57 +0000)]
Fix Richard's patch so that it's actually C :-/

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

18 years agoAnother highlighting patch from Richard Boulton: immediately flag
simon [Wed, 1 Jun 2005 18:33:25 +0000 (18:33 +0000)]
Another highlighting patch from Richard Boulton: immediately flag
any actual clashes (duplicate numbers in a row, column or block) in
red. This is a non-privileged deduction: it doesn't compare against
a known solution or consult a solver. It simply indicates reasons
why (no superset of) the current grid would cause the completion
flash to go off.

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

18 years agoMiscellaneous fixes from James Harvey's PalmOS porting work:
simon [Wed, 1 Jun 2005 17:47:56 +0000 (17:47 +0000)]
Miscellaneous fixes from James Harvey's PalmOS porting work:
 - fixed numerous memory leaks (not Palm-specific)
 - corrected a couple of 32-bit-int assumptions (vital for Palm but
   generally a good thing anyway)
 - lifted a few function pointer types into explicit typedefs
   (neutral for me but convenient for the source-munging Perl
   scripts he uses to deal with Palm code segment rules)
 - lifted a few function-level static arrays into global static
   arrays (neutral for me but apparently works round a Palm tools
   bug)
 - a couple more presets in Rectangles (so that Palm, or any other
   slow platform which can't handle the larger sizes easily, can
   still have some variety available)
 - in Solo, arranged a means of sharing scratch space between calls
   to nsolve to prevent a lot of redundant malloc/frees (gives a 10%
   speed increase even on existing platforms)

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

18 years agoArrange that random seeds are as harmonised as they can reasonably
simon [Wed, 1 Jun 2005 12:46:27 +0000 (12:46 +0000)]
Arrange that random seeds are as harmonised as they can reasonably
be between interactive and batch use.

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

18 years agoI've proved that a grid dimension of 2 is capable of irretrievably
simon [Wed, 1 Jun 2005 12:42:30 +0000 (12:42 +0000)]
I've proved that a grid dimension of 2 is capable of irretrievably
hanging the grid generator and that there's no way to fix it.
Therefore, lower limit of 3 squares in each direction, which will
upset envelope-pushers everywhere but doesn't destroy any actually
interesting puzzles.

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

18 years agoGareth points out that the recess highlights around the outside of
simon [Wed, 1 Jun 2005 07:22:21 +0000 (07:22 +0000)]
Gareth points out that the recess highlights around the outside of
the grid, in all games that have them, are drawn incorrectly when
the grid is not square. Fixed.

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

18 years agoPatches from Richard B for Solo:
simon [Wed, 1 Jun 2005 07:01:32 +0000 (07:01 +0000)]
Patches from Richard B for Solo:
 - prevent highlighting a clue square at all
 - enable easier switching between highlight types by not requiring
   a left-click highlight to be left-click-cancelled before
   right-clicking, and vice versa
 - fix bit-rot in -DSTANDALONE_SOLVER
Also one of mine:
 - replicate Richard's -DSTANDALONE_SOLVER fix in Pattern, where it
   was also broken.

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

18 years agoChris Emerson observed the same status-bar flicker under GTK as I
simon [Wed, 1 Jun 2005 06:54:14 +0000 (06:54 +0000)]
Chris Emerson observed the same status-bar flicker under GTK as I
did under Windows, so here's his patch (blatantly copied from my own
fix in windows.c :-).

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

18 years agoTypo in click bounds checking.
simon [Wed, 1 Jun 2005 06:47:55 +0000 (06:47 +0000)]
Typo in click bounds checking.

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

18 years agoBetter mouse button handling in Mines:
simon [Tue, 31 May 2005 18:38:01 +0000 (18:38 +0000)]
Better mouse button handling in Mines:
 - middle button now also triggers the clear-around-square action
 - a special-case handler in midend_process_key() arranges that the
   left button always trumps the right button if both are pressed
   together, meaning that Windows Minesweeper players used to
   pressing L+R to clear around a square should still be able to do
   so without any strange behaviour.
(The latter touches all game backends, yet again, to add a field to
the game structure which is zero in everything except Mines.)

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

18 years agoBah, and remove the TODO item. As usual.
simon [Tue, 31 May 2005 18:25:06 +0000 (18:25 +0000)]
Bah, and remove the TODO item. As usual.

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

18 years agoNow _this_ is what Undo ought to be doing in a Minesweeper clone.
simon [Tue, 31 May 2005 18:24:39 +0000 (18:24 +0000)]
Now _this_ is what Undo ought to be doing in a Minesweeper clone.
Rather than revealing the entire mine layout when you die, we now
only reveal the one mine that killed you. You can then Undo and
continue playing, without having spoiled the rest of the grid for
yourself. The number of times you've died is counted in the status
line (and is not reduced by Undo :-).

Amusingly, I think this in itself is quite a good way of dealing
with ambiguous sections in a Minesweeper grid: they no longer
_completely_ spoil your enjoyment of the game, because you can still
play the remainder of the grid even if you haven't got a completely
clean sweep. Just my luck that I should invent the idea when I've
already arranged for ambiguous sections to be absent :-)

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

18 years agoAha! It turns out, after a bit of failure-mode profiling, that when
simon [Tue, 31 May 2005 18:09:28 +0000 (18:09 +0000)]
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

18 years agovalgrind spotted this array underrun. I wonder if this might have
simon [Tue, 31 May 2005 17:46:22 +0000 (17:46 +0000)]
valgrind spotted this array underrun. I wonder if this might have
been causing some of Verity's nonreproducible weirdnesses.

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

18 years agoOops! A trivial typo in obfuscate_bitmap() made the obfuscation
simon [Tue, 31 May 2005 17:09:39 +0000 (17:09 +0000)]
Oops! A trivial typo in obfuscate_bitmap() made the obfuscation
function rather less uniform-looking than I'd intended. I _thought_
it looked a bit fishy, but had assumed it was just the human
tendency to see patterns where none exist. Now fixed, and some real
test vectors confirm that this time the obfuscation function is
actually what I intended it to be.

This means that all masked game IDs generated before this revision
are now invalid. That's a shame, but the game is only a day old and
I think I can reasonably justify it as teething trouble.

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

18 years ago`Solve' operation is relatively simple in Mines.
simon [Tue, 31 May 2005 13:02:26 +0000 (13:02 +0000)]
`Solve' operation is relatively simple in Mines.

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

18 years agoApparently a number of Windows programs like to use ^Y as a keyboard
simon [Tue, 31 May 2005 12:41:18 +0000 (12:41 +0000)]
Apparently a number of Windows programs like to use ^Y as a keyboard
shortcut for Redo. I wasn't doing anything else with it, so why not?

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

18 years agoDocument the mouse control method for Cube.
jacob [Tue, 31 May 2005 12:12:47 +0000 (12:12 +0000)]
Document the mouse control method for Cube.

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

18 years agoMove definition of PI into puzzles.h. If nothing else, the definition in cube.c
jacob [Tue, 31 May 2005 12:03:25 +0000 (12:03 +0000)]
Move definition of PI into puzzles.h. If nothing else, the definition in cube.c
had a typo :)

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

18 years agoMouse-based interface for Cube: you left-click anywhere on the grid
simon [Tue, 31 May 2005 11:43:51 +0000 (11:43 +0000)]
Mouse-based interface for Cube: you left-click anywhere on the grid
and it moves the polyhedron in the general direction of the mouse
pointer. (I had this in my initial throwaway Python implementation
of this game, but never reimplemented it in this version. It's
harder with triangles, but not too much harder.)

Since the logical-to-physical coordinate mapping in Cube is
dynamically computed, this has involved an interface change which
touches all puzzles: make_move() is now passed a pointer to the
game_drawstate, which it may of course completely ignore if it
wishes.

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

18 years agoEmma Garside suggested that it would be nice to have a different
simon [Tue, 31 May 2005 11:20:24 +0000 (11:20 +0000)]
Emma Garside suggested that it would be nice to have a different
background colour for covered and uncovered squares in Mines, since
otherwise you have to distinguish them by the edge highlights alone.
So here one is; it's not _very_ different (it just looked odd if it
was any darker than this), but anyone who wants a bigger difference
can reconfigure it using the MINES_COLOUR_1 environment variable.

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

18 years agoImproved the limited shuffle mechanism in Sixteen and Twiddle. They
simon [Tue, 31 May 2005 11:19:11 +0000 (11:19 +0000)]
Improved the limited shuffle mechanism in Sixteen and Twiddle. They
were already making sure that no shuffle move was the precise
inverse of the previous one, or contributed to repeating the
previous one so many times as to turn it into effectively fewer
moves (doing the same rotation three times in Twiddle, or shifting a
row by more than half its length in Sixteen). However, they were
only checking against the _last_ move, which meant that in any
situation where there were completely disjoint move spaces (4x4n2
Twiddle, or any Sixteen at all) it was still possible to have A then
B then inv(A) occurring in the shuffle, leading to an unnecessarily
easy game.

Now both shuffle routines keep separate track of all
_non-overlapping_ recent moves, and will avoid inverting any move
which hasn't had another move overlap it since it was made. This
should reduce the incidence of too-easy limited shuffle games,
although it can't be prevented _entirely_ (since, if nothing else,
it's always possible to increase the shuffle limit past the maximum
group radius).

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

18 years agoFix a couple of robustness issues.
simon [Tue, 31 May 2005 08:56:33 +0000 (08:56 +0000)]
Fix a couple of robustness issues.

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