sgt/puzzles
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

18 years agoGTK misfires timers at inconvenient moments, sometimes causing a new
simon [Tue, 31 May 2005 08:50:42 +0000 (08:50 +0000)]
GTK misfires timers at inconvenient moments, sometimes causing a new
puzzle of a different size to be redrawn before the pixmap is
resized, and since backends never redraw already-drawn stuff this is
a problem. Was biting me when I entered a Mines game ID of a
different size than the current settings into the Specific box.

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

18 years agoChris's patch to stop Mines depending on char being signed.
simon [Mon, 30 May 2005 22:33:34 +0000 (22:33 +0000)]
Chris's patch to stop Mines depending on char being signed.

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

18 years agoAdded an `interactive' flag to new_game_desc(), which toggles Mines
simon [Mon, 30 May 2005 18:41:40 +0000 (18:41 +0000)]
Added an `interactive' flag to new_game_desc(), which toggles Mines
between on the one hand generating indeterminate game descriptions
awaiting the initial click, and on the other hand generating
concrete ones which have had their initial click. This makes `mines
--generate' do something useful.

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

18 years ago`Copy' operation for Mines.
simon [Mon, 30 May 2005 18:24:06 +0000 (18:24 +0000)]
`Copy' operation for Mines.

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

18 years agoConstrain mine count to be at most the largest number of mines we
simon [Mon, 30 May 2005 17:57:45 +0000 (17:57 +0000)]
Constrain mine count to be at most the largest number of mines we
can guarantee to fit into the grid!

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

18 years agoFirst cut at a game timer. Yet another backend function which
simon [Mon, 30 May 2005 16:15:34 +0000 (16:15 +0000)]
First cut at a game timer. Yet another backend function which
indicates whether a particular game state should have the timer
going (for Mines the initial indeterminate state does not have this
property, and neither does a dead or won state); a midend function
that optionally (on request from the game) prepends a timer to the
front of the status bar text; some complicated midend timing code.

It's not great. It's ugly; it's probably slightly inaccurate; it's
got no provision for anyone but the game author decreeing whether a
game is timed or not. But Mines can't be taken seriously without a
timer, so it's a start.

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

18 years agoD'oh, there's always one. Remove first-click stuff from the todo list.
simon [Mon, 30 May 2005 13:11:05 +0000 (13:11 +0000)]
D'oh, there's always one. Remove first-click stuff from the todo list.

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

18 years agoMines now follows the conventional approach of offering a completely
simon [Mon, 30 May 2005 13:10:37 +0000 (13:10 +0000)]
Mines now follows the conventional approach of offering a completely
blank grid until you make the first click; to ensure solubility, it
does not generate the mine layout until that click, and then ensures
it is solvable starting from that position.

This has involved three infrastructure changes:

 - random.c now offers functions to encode and decode an entire
   random_state as a string
 - each puzzle's new_game() is now passed a pointer to the midend
   itself, which most of them ignore
 - there's a function in the midend which a game can call back to
   _rewrite_ its current game description.

So Mines now has two entirely separate forms of game ID. One
contains the generation-time parameters (n and unique) plus an
encoding of a random_state; the other actually encodes the grid once
it's been generated, and also contains the initial click position.
When called with the latter, new_game() does plausibly normal stuff.
When called with the former, it notes down all the details and waits
until the first square is opened, and _then_ does the grid
generation and updates the game description in the midend. So if,
_after_ your first click, you decide you want to share this
particular puzzle with someone else, you can do that fine.

Also in this checkin, the mine layout is no longer _copied_ between
all the game_states on the undo chain. Instead, it's in a separate
structure and all game_states share a pointer to it - and the
structure is reference-counted to ensure deallocation.

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

18 years agoNeat idea from Gareth: if you put a % on the end of the mine count
simon [Mon, 30 May 2005 12:24:31 +0000 (12:24 +0000)]
Neat idea from Gareth: if you put a % on the end of the mine count
in the Custom dialog box, it'll treat it as a mine density.

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

18 years agoNit: "warning: extra tokens at end of #endif directive"
jacob [Mon, 30 May 2005 11:49:08 +0000 (11:49 +0000)]
Nit: "warning: extra tokens at end of #endif directive"

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

18 years agoInitial checkin of my Minesweeper clone, which uses a solver during
simon [Mon, 30 May 2005 10:08:27 +0000 (10:08 +0000)]
Initial checkin of my Minesweeper clone, which uses a solver during
grid generation to arrange a mine layout that never requires guessing.

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

18 years agoInfrastructure change: game_anim_length and game_flash_length now
simon [Mon, 30 May 2005 07:55:27 +0000 (07:55 +0000)]
Infrastructure change: game_anim_length and game_flash_length now
both get passed a pointer to the game_ui. This means that if they
need to note down information for the redraw function about what
_type_ of flash or animation is required, they now have somewhere to
do so.

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

18 years agoAdd a limited-shuffle mode like that added to Sixteen and Twiddle in r5769,
jacob [Sat, 28 May 2005 23:45:43 +0000 (23:45 +0000)]
Add a limited-shuffle mode like that added to Sixteen and Twiddle in r5769,
for completeness.

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

18 years agoAdd the ability to use the Rectangles solver for actually solving
simon [Sat, 28 May 2005 08:04:29 +0000 (08:04 +0000)]
Add the ability to use the Rectangles solver for actually solving
puzzles, rather than just doing its nondeterministic number
placement thing. This enables the use of the `Solve' menu option on
externally entered game IDs, provided of course that they aren't
_too_ difficult.

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

18 years agoAdd support for Jacob's new cursor-key modifier flags in the OS X frontend.
simon [Thu, 26 May 2005 17:12:04 +0000 (17:12 +0000)]
Add support for Jacob's new cursor-key modifier flags in the OS X frontend.

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

18 years agoSorted out the barriers/corners trouble left by r5844. No wonder
simon [Thu, 26 May 2005 17:03:51 +0000 (17:03 +0000)]
Sorted out the barriers/corners trouble left by r5844. No wonder
Jacob wasn't able to find a satisfactory fix: the whole area was a
horrid mess. Fortunately, the reason it was a horrid mess was
because the Net drawing routines predated the introduction of clip()
in the frontend interface, and it turns out that clip() makes it
possible to do all this more easily and better. So, a complete
rearchitecting of barrier corners: the corner flags in the
`barriers' array are now gone (and good riddance), and corner
information is computed on the fly so as to take into account the
moving grid edges. In the process I've also updated the corner
mechanism so that a barrier `corner' (really endpoint) is drawn at
the end of _every_ barrier, not just where two meet. This has
changed the appearance of a single isolated barrier, to what I would
have wanted it to look like in the first place but achieving it
without clip() was just too fiddly.

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

18 years agoSince the split into random and descriptive IDs, the section on game seeds has
jacob [Thu, 26 May 2005 16:57:19 +0000 (16:57 +0000)]
Since the split into random and descriptive IDs, the section on game seeds has
been mostly covered by the main documentation or otherwise moot.

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

18 years agoAdd origin-shifting (Shift+cursors) and source-shifting (Ctrl+cursors) to Net.
jacob [Thu, 26 May 2005 13:40:38 +0000 (13:40 +0000)]
Add origin-shifting (Shift+cursors) and source-shifting (Ctrl+cursors) to Net.
(Adding modifier+cursors handling has had minor knock-on effects on the other
puzzles, so that they can continue to ignore modifiers.)

(An unfortunate side effect of this is some artifacts in exterior barrier
drawing; notably, a disconnected corner can now appear at the corner of the
grid under some circumstances. I haven't found a satisfactory way round
this yet.)

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

18 years agoSupport for `pencil marks' in Solo, by right-clicking and typing a
simon [Wed, 25 May 2005 11:09:43 +0000 (11:09 +0000)]
Support for `pencil marks' in Solo, by right-clicking and typing a
number. Many thanks to Chris Thomas, for helping with the detailed
UI design by means of testing an endless series of prototypes.

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

19 years agoMention NetWalk and update comment
jacob [Tue, 24 May 2005 20:28:38 +0000 (20:28 +0000)]
Mention NetWalk and update comment

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

19 years agoAvoid leading zeroes on internally generated random seeds, _just_ in
simon [Mon, 23 May 2005 12:02:37 +0000 (12:02 +0000)]
Avoid leading zeroes on internally generated random seeds, _just_ in
case they confuse anyone who expects the same seed without the
leading zero to be equivalent.

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

19 years agoI'm sick of `--generate' giving the same answers if you run it twice
simon [Mon, 23 May 2005 11:15:39 +0000 (11:15 +0000)]
I'm sick of `--generate' giving the same answers if you run it twice
in one second. Switched the Unix get_random_seed() to using
gettimeofday() rather than time().

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

19 years agoThe GTK `--generate' option didn't validate the game parameters. It
simon [Mon, 23 May 2005 11:13:39 +0000 (11:13 +0000)]
The GTK `--generate' option didn't validate the game parameters. It
does now.

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

19 years agoNet hangs if you ask it for a 2xn or nx2 wrapping puzzle with a
simon [Mon, 23 May 2005 11:03:52 +0000 (11:03 +0000)]
Net hangs if you ask it for a 2xn or nx2 wrapping puzzle with a
unique solution. This, it turns out, is because there is literally
no such thing. Protective constraint added to validate_params(),
with a proof in a comment alongside.

If you really want a 2xn or nx2 wrapping puzzle, you can still have
one if you turn uniqueness off.

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

19 years agoAesthetic improvements, mostly suggested by Gareth.
simon [Sun, 22 May 2005 13:35:13 +0000 (13:35 +0000)]
Aesthetic improvements, mostly suggested by Gareth.

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

19 years agoForgot to add print.py to the source archive. Ahem.
simon [Sun, 22 May 2005 12:45:39 +0000 (12:45 +0000)]
Forgot to add print.py to the source archive. Ahem.

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

19 years agoAnother tweak to the solver to make it handle blank tiles correctly.
simon [Sun, 22 May 2005 12:14:39 +0000 (12:14 +0000)]
Another tweak to the solver to make it handle blank tiles correctly.
The previous checkin stopped it choking on them, but it didn't
actually manage to _deduce_ that all the edges bordering them had to
be closed. Now it does better.

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

19 years agoSpecial case in dead-end checking which prevents the solver falling
simon [Sun, 22 May 2005 11:45:20 +0000 (11:45 +0000)]
Special case in dead-end checking which prevents the solver falling
over on a grid containing a 0 (completely blank) tile. This can't
happen in self-generated grids, but can happen if you type in a grid
from another Net implementation. Previously, the solver would notice
(technically correctly!) that a completely blank tile connects to no
other tiles and thus forms an isolated subgraph, and would therefore
complain that no orientation of that tile could possibly yield a
valid solution...

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

19 years agoThe Net solver now makes use of barrier information when applied to
simon [Sun, 22 May 2005 11:15:03 +0000 (11:15 +0000)]
The Net solver now makes use of barrier information when applied to
a typed-in grid.

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

19 years agoIt occurred to me yesterday that Net could perfectly well be played
simon [Sun, 22 May 2005 11:06:25 +0000 (11:06 +0000)]
It occurred to me yesterday that Net could perfectly well be played
on paper, so here's a routine to print it out.

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

19 years agoEnsure that an old random seed isn't left around for the user to see when a
jacob [Sat, 21 May 2005 22:07:48 +0000 (22:07 +0000)]
Ensure that an old random seed isn't left around for the user to see when a
descriptive ID has been specified.
Fix tiny memory leak.

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

19 years agoCleanups:
simon [Sat, 21 May 2005 13:39:23 +0000 (13:39 +0000)]
Cleanups:
 - fix documentation of Net's unique solution option (should have
   tested before last checkin)
 - make unique solutions optional in Rectangles too (same reasons)
 - tidy up various issues in parameter encoding in both games.

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

19 years agoSolution uniqueness for Net. Can be disabled on request (but is
simon [Sat, 21 May 2005 13:23:26 +0000 (13:23 +0000)]
Solution uniqueness for Net. Can be disabled on request (but is
enabled by default), since ambiguous sections in grids can present
additional interesting challenges. I think uniqueness is a better
default, though.

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

19 years agoMove IDM_ABOUT so that it doesn't overlap the presets space! Ahem.
simon [Fri, 20 May 2005 12:30:37 +0000 (12:30 +0000)]
Move IDM_ABOUT so that it doesn't overlap the presets space! Ahem.

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

19 years agoCunning way to ensure unique solutions in generated Rectangles
simon [Thu, 19 May 2005 16:17:03 +0000 (16:17 +0000)]
Cunning way to ensure unique solutions in generated Rectangles
puzzles. I generate the grid of rectangles as normal, but before I
place the numbers I run it through a non-deterministic solver
algorithm which tries to do as much as it can with as little
information about where the numbers are going to be. The solver
itself narrows down the number placement when it runs out of steam,
but does so as little as possible. Once it reaches a state where it
has ensured solubility, and then the generation algorithm chooses
random number placement from whatever's left.

Occasionally it paints itself into a corner and can't ensure a
unique solution no matter what happens; in that situation we just
have to give up, generate a fresh grid, and try again.

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

19 years agoIf you paste in a random seed with different ephemeral parameters
simon [Wed, 18 May 2005 17:41:53 +0000 (17:41 +0000)]
If you paste in a random seed with different ephemeral parameters
from the currently configured ones, and then bring the Random Seed
box back up, the wrong parameters get shown, and the resulting
random seed is incorrect for the current game.

At least, it was, until this checkin.

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

19 years agoRectangles random seed IDs shouldn't bother stating the expansion
simon [Wed, 18 May 2005 17:28:48 +0000 (17:28 +0000)]
Rectangles random seed IDs shouldn't bother stating the expansion
factor if it's zero.

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

19 years ago--version.
simon [Wed, 18 May 2005 17:27:16 +0000 (17:27 +0000)]
--version.

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

19 years agoIt's a good idea to validate presets received from the environment.
simon [Wed, 18 May 2005 17:25:30 +0000 (17:25 +0000)]
It's a good idea to validate presets received from the environment.

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

19 years agoMove the colour configuration into midend.c so that it becomes
simon [Wed, 18 May 2005 09:04:47 +0000 (09:04 +0000)]
Move the colour configuration into midend.c so that it becomes
cross-platform, and rename the environment variables so that they
follow the puzzle name. Should allow a static environment
configuration for each puzzle. Also introduced a <game>_PRESETS
variable for people whose favourite configuration isn't on the Type
menu by default.

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

19 years agoStandalone solvers were broken by my recent API changes.
simon [Wed, 18 May 2005 08:34:01 +0000 (08:34 +0000)]
Standalone solvers were broken by my recent API changes.

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

19 years agoUpdate doc for recent changes in Restart behaviour.
jacob [Tue, 17 May 2005 18:04:12 +0000 (18:04 +0000)]
Update doc for recent changes in Restart behaviour.

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

19 years agoAfter much thought, I've decided that `Restart' on r is not a
simon [Tue, 17 May 2005 17:20:08 +0000 (17:20 +0000)]
After much thought, I've decided that `Restart' on r is not a
particularly useful keypress, particularly given how easy it is to
confuse it with `Redo'. So both r and ^R are now Redo, and Restart
is relegated to being a menu-only option.

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

19 years agoNull-terminate generated Net/Netslide descriptive game IDs.
jacob [Tue, 17 May 2005 12:02:30 +0000 (12:02 +0000)]
Null-terminate generated Net/Netslide descriptive game IDs.

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

19 years agoKeyboard shortcuts for Twiddle: abcdABCD in line with the notation
simon [Tue, 17 May 2005 11:53:42 +0000 (11:53 +0000)]
Keyboard shortcuts for Twiddle: abcdABCD in line with the notation
Gareth and I have been using to analyse the game, and also the
number pad. They don't work sensibly for all sizes, but they'll be
handy for the most common ones.

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

19 years agoJust for Gareth: a means of overriding individual game colour
simon [Tue, 17 May 2005 11:47:33 +0000 (11:47 +0000)]
Just for Gareth: a means of overriding individual game colour
settings using environment variables. GTK frontend only, because
this is an unsupported (and unprincipled) hack.

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

19 years ago`Restart' is now an undo-able action: it appends a move to the end
simon [Tue, 17 May 2005 11:46:55 +0000 (11:46 +0000)]
`Restart' is now an undo-able action: it appends a move to the end
of the undo list rather than destroying it. Partly this is because
accidental restarts are a real pain, and partly because it allows
you to compare the initial to the current state by restart-then-undo
which is handy in some puzzles.

In order to do this, I've introduced an additional per-entry field
in the undo list in the midend, which tracks which states were
created by `unusual' operations (Solve and Restart). The midend
takes care of suppressing animation and completion flashes during
transitions between a `special' state and its predecessor, relieving
the game backends of having to do it individually.

(This probably means I could remove some complexity in the
flash_time() functions in most backends, but I haven't done that in
this checkin.)

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

19 years agocomment c'n'p error
jacob [Tue, 17 May 2005 11:00:15 +0000 (11:00 +0000)]
comment c'n'p error

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

19 years agoCube's dup_game() function was missing a field. Oops.
simon [Tue, 17 May 2005 10:59:47 +0000 (10:59 +0000)]
Cube's dup_game() function was missing a field. Oops.

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

19 years agoThe game IDs for Net (and Netslide) have always been random seeds
simon [Mon, 16 May 2005 18:57:09 +0000 (18:57 +0000)]
The game IDs for Net (and Netslide) have always been random seeds
rather than literal grid descriptions, which has always faintly
annoyed me because it makes it impossible to type in a grid from
another source. However, Gareth pointed out that short random-seed
game descriptions are useful, because you can read one out to
someone else without having to master the technology of cross-
machine cut and paste, or you can have two people enter the same
random seed simultaneously in order to race against each other to
complete the same puzzle. So both types of game ID seem to have
their uses.

Therefore, here's a reorganisation of the whole game ID concept.
There are now two types of game ID: one has a parameter string then
a hash then a piece of arbitrary random seed text, and the other has
a parameter string then a colon then a literal game description. For
most games, the latter is identical to the game IDs that were
previously valid; for Net and Netslide, old game IDs must be
translated into new ones by turning the colon into a hash, and
there's a new descriptive game ID format.

Random seed IDs are not guaranteed to be portable between software
versions (this is a major reason why I added version reporting
yesterday). Descriptive game IDs have a longer lifespan.

As an added bonus, I've removed the sections of documentation
dealing with game parameter encodings not shown in the game ID
(Rectangles expansion factor, Solo symmetry and difficulty settings
etc), because _all_ parameters must be specified in a random seed ID
and therefore users can easily find out the appropriate parameter
string for any settings they have configured.

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

19 years agoMissed a vital semicolon off the Cygwin version.c makefile fragment.
simon [Sun, 15 May 2005 11:12:05 +0000 (11:12 +0000)]
Missed a vital semicolon off the Cygwin version.c makefile fragment.

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

19 years agoEr, except that I already had a makedist.sh. Transferred new version
simon [Sun, 15 May 2005 10:58:09 +0000 (10:58 +0000)]
Er, except that I already had a makedist.sh. Transferred new version
code into that!

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

19 years agoAdded automatic determination of the SVN revision number if a build
simon [Sun, 15 May 2005 10:52:23 +0000 (10:52 +0000)]
Added automatic determination of the SVN revision number if a build
takes place in a checked-out copy. Also added mkunxarc.sh which does
the same version determination before building its archive.

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

19 years agoIntroduce a versioning mechanism, and an `About' box in all front
simon [Sun, 15 May 2005 10:31:11 +0000 (10:31 +0000)]
Introduce a versioning mechanism, and an `About' box in all front
ends. Versioning will be done solely by Subversion revision number,
since development on these puzzles is very incremental and gradual
and there don't tend to be obvious points to place numbered
releases.

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

19 years agoI've had two complaints that Solo ought to recognise the numeric
simon [Thu, 12 May 2005 18:25:57 +0000 (18:25 +0000)]
I've had two complaints that Solo ought to recognise the numeric
keypad. The reason it doesn't is because front ends were carefully
translating the numeric keypad into 8-way directional keys for the
benefit of Cube. Therefore, a policy change:
 - front ends process the numeric keypad by sending MOD_NUM_KEYPAD |
   '3' and similar
 - front ends running on a platform with Num Lock SHOULD do this
   _irrespective_ of the state of Num Lock
 - back ends do whatever they see fit with numeric keypad keys.
Result: the numeric keypad now works in Solo, and also works in OS X
Cube (which it previously didn't because I forgot to implement that
bit of the front end!).

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

19 years agoThe two Rubik-like puzzles, Sixteen and Twiddle, now support an
simon [Wed, 11 May 2005 20:38:10 +0000 (20:38 +0000)]
The two Rubik-like puzzles, Sixteen and Twiddle, now support an
additional configuration parameter, which is the number of shuffle
moves. By default the grid will be fully shuffled so that you need a
general solution algorithm to untangle it, but if you prefer you can
request a grid which has had (say) precisely four moves made on it,
and then attempt to exactly reverse those four moves.

Currently this feature is only available from the Custom box, and
not in any presets.

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

19 years agoBah. Try the r5766 fix again, this time without the typo.
simon [Wed, 11 May 2005 18:49:42 +0000 (18:49 +0000)]
Bah. Try the r5766 fix again, this time without the typo.

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

19 years agoCompletion flashes were occasionally failing to be cleaned up if a
simon [Wed, 11 May 2005 13:03:17 +0000 (13:03 +0000)]
Completion flashes were occasionally failing to be cleaned up if a
subsequent move animation began during them. Tracked this to
overenthusiastic use of clip() and fixed it.

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

19 years agosolve_game() is passed the _initial_ game state, not the most recent
simon [Sat, 7 May 2005 16:07:26 +0000 (16:07 +0000)]
solve_game() is passed the _initial_ game state, not the most recent
one; so we can't just set `ret->completed = ret->movecount' and hope
it's been set to something other than zero. Instead, we set both
move counts to 1, which is entirely arbitrary but works.

This fixes a subtle bug with the Solve feature: if you pressed
Solve, then disturbed the grid, then brought it back to the solved
state by making more forward moves (rather than using Undo), then
the first time you did this the `Moves since auto-solve' status line
would reset to zero.

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

19 years agoAdd 3x3 Trivial to the presets list, and make it the default.
simon [Sat, 7 May 2005 12:35:04 +0000 (12:35 +0000)]
Add 3x3 Trivial to the presets list, and make it the default.

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

19 years agoAha, here's a nice easy way to generate really hard puzzles. Added
simon [Sat, 7 May 2005 12:30:29 +0000 (12:30 +0000)]
Aha, here's a nice easy way to generate really hard puzzles. Added
the missing fifth difficulty level to Solo: `Unreasonable', in which
even set-based reasoning is insufficient and there's no alternative
but to guess a number and backtrack if it didn't work. (Solutions
are still guaranteed unique, however.) In fact it now seems to take
less time to generate a puzzle of this grade than `Advanced'!

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

19 years agoFix outdated comment
jacob [Wed, 4 May 2005 13:17:45 +0000 (13:17 +0000)]
Fix outdated comment

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

19 years agoAllow for trailing '\0' in game_text_format() in various games.
jacob [Wed, 4 May 2005 12:56:04 +0000 (12:56 +0000)]
Allow for trailing '\0' in game_text_format() in various games.

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

19 years agoThe Twiddle shuffling algorithm was theoretically parity-unbalanced:
simon [Wed, 4 May 2005 12:52:51 +0000 (12:52 +0000)]
The Twiddle shuffling algorithm was theoretically parity-unbalanced:
it performed a fixed number of shuffling moves, and on each one it
had a 2/3 chance of flipping the permutation parity and a 1/3 chance
of keeping it the same. Markov analysis shows that over a run of
1500-odd shuffle moves this will end up being an undetectably small
actual bias in the parity of the generated grid, but it offends my
sense of pedantry nonetheless so here's a small change to make the
number of shuffling moves itself have randomly chosen parity. The
parity of generated grids should now be _exactly_ 50:50.

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

19 years agomarkup typo
jacob [Wed, 4 May 2005 12:24:16 +0000 (12:24 +0000)]
markup typo

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

19 years agoI've changed my mind. For the benefit of users with slower
simon [Mon, 2 May 2005 16:59:50 +0000 (16:59 +0000)]
I've changed my mind. For the benefit of users with slower
computers, let's save the Solo and Pattern grids at generation time
and regurgitate them when asked to solve, rather than doing all the
work over again.

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

19 years agoFix line endings when pasting on Windows.
simon [Mon, 2 May 2005 16:37:20 +0000 (16:37 +0000)]
Fix line endings when pasting on Windows.

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

19 years agoAdd more useful ignores.
simon [Mon, 2 May 2005 13:41:34 +0000 (13:41 +0000)]
Add more useful ignores.

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

19 years agoForgot to mention that you can undo a Solve operation.
simon [Mon, 2 May 2005 13:27:59 +0000 (13:27 +0000)]
Forgot to mention that you can undo a Solve operation.

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

19 years agoAhem. The `Solve' option in orientable Twiddle needs to correct the
simon [Mon, 2 May 2005 13:22:25 +0000 (13:22 +0000)]
Ahem. The `Solve' option in orientable Twiddle needs to correct the
orientations as well as the order!

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

19 years agoSilly (but harmless) typo.
simon [Mon, 2 May 2005 13:18:24 +0000 (13:18 +0000)]
Silly (but harmless) typo.

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

19 years agoAdded an automatic `Solve' feature to most games. This is useful for
simon [Mon, 2 May 2005 13:17:10 +0000 (13:17 +0000)]
Added an automatic `Solve' feature to most games. This is useful for
various things:
 - if you haven't fully understood what a game is about, it gives
   you an immediate example of a puzzle plus its solution so you can
   understand it
 - in some games it's useful to compare your solution with the real
   one and see where you made a mistake
 - in the rearrangement games (Fifteen, Sixteen, Twiddle) it's handy
   to be able to get your hands on a pristine grid quickly so you
   can practise or experiment with manoeuvres on it
 - it provides a good way of debugging the games if you think you've
   encountered an unsolvable grid!

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

19 years agoOops; forgot to check in the copy-to-clipboard option for Windows.
simon [Mon, 2 May 2005 10:55:32 +0000 (10:55 +0000)]
Oops; forgot to check in the copy-to-clipboard option for Windows.

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

19 years agoIntroduce the concept of a `game_aux_info' structure. This is
simon [Mon, 2 May 2005 10:12:26 +0000 (10:12 +0000)]
Introduce the concept of a `game_aux_info' structure. This is
constructed at the same time as an internally generated game seed,
so that it can preserve any interesting information known by the
program at generation time but not physically contained within the
text of the game seed itself. (Such as, for example, the solution.)
Currently not used for anything yet, but it will be.

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

19 years agoIt's actually vitally important, it turns out, to have all of the
simon [Mon, 2 May 2005 09:42:09 +0000 (09:42 +0000)]
It's actually vitally important, it turns out, to have all of the
`Cut', `Copy' and `Paste' items in the Edit menu of an OS X
application - because there's nothing else that enables the keyboard
cut/copy/paste shortcuts in an edit box! OS X Puzzles can now have
game IDs pasted into it, which it previously couldn't.

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