simon [Sun, 4 Feb 2007 13:44:38 +0000 (13:44 +0000)]
Looking for puzzles*.tar.gz in the right directory is liable to make
the .htaccess build work better :-)
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7214
cda61777-01e9-0310-a592-
d414129be87e
simon [Sun, 4 Feb 2007 11:44:10 +0000 (11:44 +0000)]
Build script for Puzzles using bob. I've also added a piece of extra
infrastructure to the mkfiles.pl framework for the convenience of
the build script: it generates `wingames.lst', a list of the Windows
binaries which are ship-worthy games as opposed to nullgame or
command-line auxiliary programs.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7206
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 27 Jan 2007 10:25:20 +0000 (10:25 +0000)]
Misdirected cross-reference spotted by Jonas Koelker.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7172
cda61777-01e9-0310-a592-
d414129be87e
simon [Tue, 16 Jan 2007 12:54:24 +0000 (12:54 +0000)]
Marcin Wojdyr points out that the use of `>&' to redirect both
stdout and stderr is non-standard. Switch to a POSIX-blessed
alternative.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7116
cda61777-01e9-0310-a592-
d414129be87e
simon [Mon, 15 Jan 2007 23:30:44 +0000 (23:30 +0000)]
Phil Bordelon points out an off-by-one error: since Solo doesn't use
zero as a valid puzzle symbol, it can support at most 35 symbols,
not 36. (This is largely academic since IME anything above about 25
is impractical to generate, but there we go.)
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7115
cda61777-01e9-0310-a592-
d414129be87e
simon [Mon, 15 Jan 2007 20:21:57 +0000 (20:21 +0000)]
Patch from James H which shouldn't change the functionality of
Loopy, but makes it build more sensibly on the Palm.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7114
cda61777-01e9-0310-a592-
d414129be87e
simon [Mon, 15 Jan 2007 20:07:18 +0000 (20:07 +0000)]
Patch from James H to fix the occasional generation of puzzles
harder than requested.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7113
cda61777-01e9-0310-a592-
d414129be87e
simon [Mon, 15 Jan 2007 20:04:11 +0000 (20:04 +0000)]
Phil Bordelon points out that the Unequal difficulty settings
documentation is a bit odd, and also offers a signedness fix in
latin.c.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7112
cda61777-01e9-0310-a592-
d414129be87e
simon [Sun, 14 Jan 2007 10:13:29 +0000 (10:13 +0000)]
Give all the intermediate files distinct file names, so that a
multi-CPU machine can speed up the icon build using `make -j' and
not have it break.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7106
cda61777-01e9-0310-a592-
d414129be87e
jacob [Sat, 13 Jan 2007 19:19:21 +0000 (19:19 +0000)]
Formatting tweaks / index terms in Unequal docs.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7105
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 13 Jan 2007 15:17:55 +0000 (15:17 +0000)]
First time I've added a new puzzle since the icons-and-screenshots
upheaval. Modify the checklist accordingly.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7103
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 13 Jan 2007 14:59:15 +0000 (14:59 +0000)]
Icon for Unequal.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7101
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 13 Jan 2007 14:44:50 +0000 (14:44 +0000)]
Add James H's new puzzle, `Unequal' (otherwise known as the
Guardian's `Futoshiki').
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7100
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 13 Jan 2007 12:03:42 +0000 (12:03 +0000)]
Remove a couple of rogue make targets for `osx.icns.o' and
`osx-info.plist.o' which had crept into most of the Makefiles.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7099
cda61777-01e9-0310-a592-
d414129be87e
simon [Thu, 11 Jan 2007 09:26:09 +0000 (09:26 +0000)]
Rather to my surprise given the amount of testing this code has had,
Kevin Lyles spotted a tree234 bug! copytree234() segfaulted when
asked to copy a tree containing no elements, due to failing to allow
for the case that t->root might be NULL. Fixed, and added a
regression test.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7092
cda61777-01e9-0310-a592-
d414129be87e
jacob [Thu, 4 Jan 2007 19:24:43 +0000 (19:24 +0000)]
In Windows/Gtk front-ends, consistently use the ellipsis convention for naming
menu items which bring up dialogs.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7058
cda61777-01e9-0310-a592-
d414129be87e
simon [Wed, 3 Jan 2007 09:51:42 +0000 (09:51 +0000)]
Phil Bordelon's patch yesterday should have initialised the GError
to NULL.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7052
cda61777-01e9-0310-a592-
d414129be87e
simon [Tue, 2 Jan 2007 19:45:19 +0000 (19:45 +0000)]
Phil Bordelon points out that my invocation of gdk_pixbuf_save()
isn't quite right.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7050
cda61777-01e9-0310-a592-
d414129be87e
jacob [Mon, 1 Jan 2007 21:19:14 +0000 (21:19 +0000)]
It's a new year.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7048
cda61777-01e9-0310-a592-
d414129be87e
jacob [Sat, 30 Dec 2006 00:50:29 +0000 (00:50 +0000)]
Document the new --game and --load options on Unix.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7040
cda61777-01e9-0310-a592-
d414129be87e
jacob [Sat, 30 Dec 2006 00:26:16 +0000 (00:26 +0000)]
Make errors in option parsing actually _do_ something in interactive mode.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7039
cda61777-01e9-0310-a592-
d414129be87e
jacob [Fri, 29 Dec 2006 22:43:47 +0000 (22:43 +0000)]
Bring .R files for nullgame and unfinished puzzles up to date with the rest of
the world (by adding icon support).
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7038
cda61777-01e9-0310-a592-
d414129be87e
jacob [Fri, 29 Dec 2006 16:42:02 +0000 (16:42 +0000)]
Update manual copyright to 2006.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7036
cda61777-01e9-0310-a592-
d414129be87e
jacob [Thu, 28 Dec 2006 21:39:22 +0000 (21:39 +0000)]
Add NO_HTMLHELP and turn it on by default in Makefile.cyg.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7033
cda61777-01e9-0310-a592-
d414129be87e
simon [Thu, 28 Dec 2006 17:07:21 +0000 (17:07 +0000)]
Enhance icon.pl to be a fully general Windows icon builder: it now
supports monochrome icons, can deal with any size of image you're
mad enough to put in there, and will construct icons with whatever
combination of sizes and resolutions you feel like specifying. This
has involved a change in the command-line syntax, hence the
adjustment to Makefile.
(I don't imagine that the changes described here will be critical to
Puzzles any time soon, but I might reuse this script elsewhere and
then I won't want it to have arbitrary limitations.)
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7031
cda61777-01e9-0310-a592-
d414129be87e
simon [Wed, 27 Dec 2006 16:49:39 +0000 (16:49 +0000)]
`make all' targets are usually useful.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7026
cda61777-01e9-0310-a592-
d414129be87e
simon [Wed, 27 Dec 2006 15:49:16 +0000 (15:49 +0000)]
Er, further makedist fixes. Helps if you test _before_ checkin.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7025
cda61777-01e9-0310-a592-
d414129be87e
simon [Wed, 27 Dec 2006 15:36:27 +0000 (15:36 +0000)]
And update makedist.sh to put all the new stuff into the source
tarball.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7024
cda61777-01e9-0310-a592-
d414129be87e
simon [Wed, 27 Dec 2006 15:33:43 +0000 (15:33 +0000)]
Fix the Cygwin RCFLAGS in the light of recent changes.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7023
cda61777-01e9-0310-a592-
d414129be87e
simon [Wed, 27 Dec 2006 15:21:55 +0000 (15:21 +0000)]
Aha, this seems to be a more sensible way of getting screenshots:
instead of having the puzzle binary export its window ID to a script
which then runs xwd, we can use the gdk-pixbuf library to have the
puzzle binary _itself_ read its own internal pixmap and save it
straight to a PNG. How handy. And faster, and less timing-sensitive.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7022
cda61777-01e9-0310-a592-
d414129be87e
simon [Wed, 27 Dec 2006 15:10:59 +0000 (15:10 +0000)]
Support for run-time icons in the GTK puzzles. This involved another
mkfiles.pl change (I don't seem to be planning ahead very well this
week), this time to provide a list of fallback options for an object
file. That way, I have a no-icon.c which quietly replaces
icons/foo-icon.c if the latter doesn't exist, and so again people
checking straight out from Subversion shouldn't have trouble.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7021
cda61777-01e9-0310-a592-
d414129be87e
simon [Wed, 27 Dec 2006 11:05:20 +0000 (11:05 +0000)]
Actually introduce the ability to build the Windows icons into the
Windows puzzle binaries. This checkin involves several distinct
changes:
- mkfiles.pl now has an extra feature: if an object file is listed
in Recipe with a trailing question mark, it will be considered
optional, and silently dropped from the makefile if its primary
source file isn't present at the time mkfiles.pl runs. This means
people who check out the puzzles from Subversion and just run
mkfiles.pl shouldn't get build failures; they just won't get the
icons.
- all the .R files now use this feature to include an optional
Windows resource file.
- the .rc resource source files are built by icons/Makefile.
- windows.c finds the icon if present and uses it in place of the
standard Windows application icon.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7020
cda61777-01e9-0310-a592-
d414129be87e
simon [Wed, 27 Dec 2006 10:26:13 +0000 (10:26 +0000)]
Improve the icon images by cropping selected pieces out of most of
the main screenshots. (A few, like Map, were perfect already.)
In the process I've vertically reflected the puzzle shown in the
Pattern save file, to bring a more interesting piece of it into the
top left corner :-)
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7019
cda61777-01e9-0310-a592-
d414129be87e
simon [Tue, 26 Dec 2006 22:00:11 +0000 (22:00 +0000)]
Code to construct Windows icon files for the puzzles, by munging the
screenshots into appropriate sizes and colour depths. This is all
done with a nasty Perl script, because ImageMagick does not output
correct .ICO format. Not sure why; it isn't _that_ hard.
I intend at some point to link the resulting icons into the actual
Windows puzzle binaries, but before then I have to make them
prettier: most of them would benefit from being derived from a
smaller crop of the puzzle screenshot instead of trying to fit the
whole thing in.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7017
cda61777-01e9-0310-a592-
d414129be87e
simon [Tue, 26 Dec 2006 16:47:28 +0000 (16:47 +0000)]
New mechanism for automatic generation of the puzzle screenshots on
the web, which I hope will also end up being extended to generate
both Windows and X icons for each individual puzzle. The mechanism
is: for each puzzle there's a save file in the `icons' subdirectory
showing a game state which I think is a decent illustration of the
puzzle, and then there's a nasty set of scripts which runs each
puzzle binary, loads that save file, grabs a screenshot using xwd,
and munges it into shape.
In order to support this I've added two new options (--redo and
--windowid) to all the GTK puzzles, which I don't expect ever to be
used outside the icons makefile. I've also added two more options
(--load and --id) which force a GTK puzzle to treat its command-line
option as a save file or as a game ID respectively (the previous
behaviour was always to guess, and sometimes it guessed wrong).
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7014
cda61777-01e9-0310-a592-
d414129be87e
simon [Sun, 24 Dec 2006 16:30:45 +0000 (16:30 +0000)]
Minor const fix.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7013
cda61777-01e9-0310-a592-
d414129be87e
simon [Sun, 24 Dec 2006 15:56:47 +0000 (15:56 +0000)]
HTML Help support for Puzzles, with the same kind of automatic
fallback behaviour as PuTTY's support.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7009
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 23 Dec 2006 08:44:51 +0000 (08:44 +0000)]
Ability to build a .CHM for Puzzles. I haven't yet arranged for it
to be used by the Windows binaries; that's the next step.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7006
cda61777-01e9-0310-a592-
d414129be87e
simon [Thu, 21 Dec 2006 17:11:56 +0000 (17:11 +0000)]
Small printing fix from Gary Wong. Shows up when printing with
solutions: the rightmost and lowermost lines of the grid never get
solution lines drawn on them.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7003
cda61777-01e9-0310-a592-
d414129be87e
simon [Fri, 24 Nov 2006 18:24:01 +0000 (18:24 +0000)]
Fix a couple of rounding errors in Inertia's gem-drawing code which
didn't happen to show up at the default resolution but made the gem
slightly skewed at larger sizes.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6919
cda61777-01e9-0310-a592-
d414129be87e
simon [Thu, 23 Nov 2006 13:17:31 +0000 (13:17 +0000)]
Optionally label the colours in Guess with letters of the alphabet.
Labels are toggled on and off by pressing L (just like Map). Might
help colour-blind users, and might also make it easier to describe
game positions to other people because `abbc' has fewer syllables
than `red, yellow, yellow, green', and hugely fewer letters if
you're typing it.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6916
cda61777-01e9-0310-a592-
d414129be87e
simon [Mon, 20 Nov 2006 10:20:46 +0000 (10:20 +0000)]
Patch I've had lurking around for over a year and not remembered to
commit: arrange that midend_set_timer(), hence game_timing_state(),
is called when the game_ui is changed. This allows timed games to
work by obscuring the initial layout until an initial click causes
it to be revealed, without requiring that they store that reveal
operation as a move in the undo chain. Not that any games actually
do this, but it's clearly a sensible thing to want to do: since
game_timing_state() _receives_ a game_ui as a parameter, obviously
it should be consulted when the game_ui changes.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6914
cda61777-01e9-0310-a592-
d414129be87e
simon [Wed, 1 Nov 2006 13:25:25 +0000 (13:25 +0000)]
James H's Palm-compatibility updates to the latest Loopy changes,
working around bugs in the Palm compiler and removing Palm-
incompatible diagnostics such as fprintf.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6889
cda61777-01e9-0310-a592-
d414129be87e
simon [Wed, 1 Nov 2006 11:31:20 +0000 (11:31 +0000)]
Mike's changes to dsf.c alter the internal storage format of dsf
structures, meaning that ad-hoc initialisation now doesn't work.
Hence, this checkin converts all ad-hoc dsf initialisations into
calls to dsf_init() or snew_dsf(). At least, I _hope_ I've caught
all of them.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6888
cda61777-01e9-0310-a592-
d414129be87e
jacob [Sun, 29 Oct 2006 17:40:45 +0000 (17:40 +0000)]
Minimal (i.e., lame) update to Loopy documentation to match reality -- it's
been wrong since r6299.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6884
cda61777-01e9-0310-a592-
d414129be87e
simon [Sun, 29 Oct 2006 09:41:02 +0000 (09:41 +0000)]
I'm sick and tired of having unfinished puzzle code lying around on
several different systems in strange directories. So I'm creating an
`unfinished' directory within source control, and centralising all
my half-finished, half-baked or otherwise half-arsed puzzle
implementations into it. Herewith Sokoban (playable but rubbish
generation), Pearl (Masyu - rubbish generation and nothing else),
Path (Number Link - rubbish generation and nothing else) and NumGame
(the Countdown numbers game - currently just a solver and not even a
generator yet).
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6883
cda61777-01e9-0310-a592-
d414129be87e
simon [Sun, 29 Oct 2006 09:34:09 +0000 (09:34 +0000)]
r6880 accidentally backed out r6780. That's what I get for accepting
source files from Mike rather than patches, and not adequately
checking the result...
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6882
cda61777-01e9-0310-a592-
d414129be87e
simon [Sun, 29 Oct 2006 09:17:07 +0000 (09:17 +0000)]
Add HTML documentation to the ignore list.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6881
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 28 Oct 2006 15:38:53 +0000 (15:38 +0000)]
Mike Pinna has done some major reworking of the Loopy solver, giving
rise to a new Hard difficulty level.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6880
cda61777-01e9-0310-a592-
d414129be87e
simon [Tue, 17 Oct 2006 08:25:40 +0000 (08:25 +0000)]
Couple of minor errors.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6872
cda61777-01e9-0310-a592-
d414129be87e
simon [Wed, 6 Sep 2006 08:23:15 +0000 (08:23 +0000)]
Forgot to put the new .R files into makedist.sh. Oops!
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6849
cda61777-01e9-0310-a592-
d414129be87e
simon [Fri, 25 Aug 2006 07:10:59 +0000 (07:10 +0000)]
Jesse W points out that I forgot to update the OS X front end in
r6420, so both drawing.c _and_ the front end were prepending the
time to the front of the Mines status bar, leading to a double
timestamp.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6796
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 5 Aug 2006 17:25:09 +0000 (17:25 +0000)]
Always something. Mention `svn add'ing the .R file in the new-puzzle
checklist, and mention the now-not-version-controlled list.c in
svn:ignore.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6782
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 5 Aug 2006 17:20:29 +0000 (17:20 +0000)]
I'm sick of repeatedly adding and removing local changes to Recipe
when testing a new game, so here's a new architecture for the Recipe
file. mkfiles.pl now supports several new features:
- an `!include' directive, which accepts wildcards
- += to append to an existing object group definition
- the ability to divert output to an arbitrary file.
So now each puzzle has a `.R' file containing a fragment of Recipe
code describing that puzzle, and the central Recipe does `!include
*.R' to construct the Makefiles. That way, I can keep as many
experimental half-finished puzzles lying around my working directory
as I like, and I won't have to keep reverting Recipe when I check in
any other changes.
As part of this change, list.c is no longer a version-controlled
file; it's now constructed by mkfiles.pl, so that it too can take
advantage of this mechanism.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6781
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 5 Aug 2006 16:35:25 +0000 (16:35 +0000)]
Extra utility function.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6780
cda61777-01e9-0310-a592-
d414129be87e
simon [Fri, 7 Jul 2006 13:59:16 +0000 (13:59 +0000)]
Random docs cleanups I've collected together.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6749
cda61777-01e9-0310-a592-
d414129be87e
jacob [Mon, 26 Jun 2006 22:01:51 +0000 (22:01 +0000)]
Since r6711, puzzles built with Gtk 1.2 would take double actions when a menu
accelerator key (N/U/R/Q) was pressed -- once for the menu accelerator, and
once more in key_event().
This workaround, while unlovely, should at least not break in future (since the
things it relies on are unlikely to change).
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6745
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 20 May 2006 12:06:41 +0000 (12:06 +0000)]
Trivial patch from Ben Hutchings to support resizable windows under
GTK. All the infrastructure in the midend and beyond was already
there; it was just a matter of enabling it!
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6712
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 20 May 2006 12:01:55 +0000 (12:01 +0000)]
Ben Hutchings's patch to add display of key accelerators in the Game
menu.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6711
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 20 May 2006 11:58:24 +0000 (11:58 +0000)]
Patch from Ben Hutchings to prevent an ugly special case in
&splitline in which a line is `split' into a line ending in a
backslash followed by a completely blank line.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6710
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 20 May 2006 11:54:21 +0000 (11:54 +0000)]
Cleanup patch from Ben Hutchings, fixing some odd-looking range
checks. He thinks they were harmless (due to being followed by other
range checks in RIGHTOF_DOT and friends) but it clearly can't hurt
to fix them anyway.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6709
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 20 May 2006 11:52:22 +0000 (11:52 +0000)]
Patch from Ben Hutchings to prevent memory leakage during Loopy game
generation.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6708
cda61777-01e9-0310-a592-
d414129be87e
simon [Sun, 12 Mar 2006 09:06:27 +0000 (09:06 +0000)]
Tidy up comments.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6601
cda61777-01e9-0310-a592-
d414129be87e
simon [Mon, 6 Mar 2006 20:03:27 +0000 (20:03 +0000)]
Introduce a new deductive mode in Slant's Hard level, which is the
generalisation of the previous deduction involving two 3s or two 1s
either adjacent or separated by a row of contiguous 2s. I always
said that was an ugly loop and really ought to arise naturally as a
special case of something more believable, and here it is.
The practical upshot is that Hard mode has just become slightly
harder: some grids generated by the new Slant will be unsolvable by
the old one's solver. I don't think it's become _excessively_ more
hard; I think I'm happy with the new difficulty level. (In
particular, I don't think the new level is sufficiently harder than
the old to make it worth preserving the old one as Medium or
anything like that.)
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6591
cda61777-01e9-0310-a592-
d414129be87e
jacob [Fri, 3 Mar 2006 20:04:13 +0000 (20:04 +0000)]
"Hold" function in Guess was completely broken.
Fix it, add holds to the undo history (by analogy with Net), and save the
current holds in saved games.
Also fix a couple of unrelated minor issues with string encoding.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6590
cda61777-01e9-0310-a592-
d414129be87e
simon [Thu, 2 Mar 2006 19:39:46 +0000 (19:39 +0000)]
I've been pondering whether to do this for months: turn the rather
washed-out yellow and green in Guess into their full-brightness pure
forms. This makes them hard to see against some backgrounds, so I'm
also surrounding all coloured pegs with black outlines. Looks a
little cartoony, but I think it's an overall improvement on the
previous look.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6589
cda61777-01e9-0310-a592-
d414129be87e
simon [Mon, 20 Feb 2006 19:51:50 +0000 (19:51 +0000)]
Mines's error signalling is highly asymmetric: if you erroneously
believe a square to be empty, you find out instantly and lethally,
but if you erroneously believe a square to be full you can
occasionally (when it doesn't cause a complementary square to be
assumed empty) not notice until you find at the very end of the game
that you're one mine heavy. To help with this, here's an error
highlighting patch: any number square surrounded by an excess of
flags will now light up red. This should be an unintrusive change,
because it will never happen unless you make a mistake.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6580
cda61777-01e9-0310-a592-
d414129be87e
simon [Sun, 19 Feb 2006 12:54:17 +0000 (12:54 +0000)]
Small docs patch from Phil Bordelon adding more history of Sudoku.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6575
cda61777-01e9-0310-a592-
d414129be87e
simon [Sun, 19 Feb 2006 12:42:46 +0000 (12:42 +0000)]
Patch from Phil Bordelon to improve Bridges' appearance by adjusting
the font size.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6573
cda61777-01e9-0310-a592-
d414129be87e
simon [Tue, 7 Feb 2006 21:45:50 +0000 (21:45 +0000)]
Tal Kelrich spotted that hitting `Solve' on a configuration which is
laser-indistinguishable from the right solution _but_ has a number
of balls outside the acceptable range does not report an error. His
example was the game ID w8h8m5M5:
1e3e6e80fa3e16265ccef7ca , omitting
the rightmost ball in the second row.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6542
cda61777-01e9-0310-a592-
d414129be87e
jacob [Sun, 8 Jan 2006 18:18:11 +0000 (18:18 +0000)]
It's a new year.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6513
cda61777-01e9-0310-a592-
d414129be87e
simon [Thu, 5 Jan 2006 09:40:51 +0000 (09:40 +0000)]
Revert a change in an assertion made in r6299. It was right the
first time, and now has a comment explaining why!
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6511
cda61777-01e9-0310-a592-
d414129be87e
jacob [Tue, 27 Dec 2005 15:36:21 +0000 (15:36 +0000)]
Add some random index terms. ("Sudoku" wasn't in the index!)
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6509
cda61777-01e9-0310-a592-
d414129be87e
simon [Mon, 26 Dec 2005 23:24:09 +0000 (23:24 +0000)]
Laurent Thioudellet reports that gcc4's ultra-cautious data flow
warnings require two more variables to be explicitly initialised. In
fact these variables are reliably initialised by a subfunction; gcc3
was happy to assume I knew what I was doing when it couldn't prove
they were definitely used uninitialised, whereas gcc4 apparently
takes the view that the onus is on me to allow it to prove they
_aren't_. I regard this as a step backwards, since the effect will
be to make explicit initialisation commonplace in cases where the
initialiser value is chosen arbitrarily and never expected to be
used, at which point (a) it will be less clear which initialisers
have genuine purpose and which are compiler-placating fluff, and (b)
valgrind's run-time uninitialised-data tracking will become less
useful. Still, the effect doesn't seem great as yet, so here's the
gcc4-placating checkin.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6508
cda61777-01e9-0310-a592-
d414129be87e
simon [Mon, 26 Dec 2005 11:26:34 +0000 (11:26 +0000)]
I've just noticed a bug in the Inertia solver: if you call it on an
already-solved grid (i.e. no gems), it will still attempt to show
you a move you can make. Eliminate that special case.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6507
cda61777-01e9-0310-a592-
d414129be87e
simon [Thu, 10 Nov 2005 11:57:15 +0000 (11:57 +0000)]
Correct w/h mixup in grid edge checks.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6452
cda61777-01e9-0310-a592-
d414129be87e
jacob [Sat, 22 Oct 2005 19:58:59 +0000 (19:58 +0000)]
Document Unix command-line options.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6423
cda61777-01e9-0310-a592-
d414129be87e
jacob [Sat, 22 Oct 2005 18:18:21 +0000 (18:18 +0000)]
Fix segfault in Tents' printing.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6422
cda61777-01e9-0310-a592-
d414129be87e
jacob [Sat, 22 Oct 2005 18:07:56 +0000 (18:07 +0000)]
Work around a couple of minor display issues with max bridges set to 4:
- the highlighting for a set of 4 lines spilled outside the tile, so would
leave white residue if undone;
- the endpoints of sets of 4 lines were not completely overprinted by the
circle of an island (at least on Windows), which was untidy.
Fixed by reducing the gap width for groups of lines which wouldn't otherwise
fit in a tile (only).
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6421
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 22 Oct 2005 17:23:55 +0000 (17:23 +0000)]
Cleanup: relieve frontends of the duty to call
midend_rewrite_statusbar() and check the result against the last
string returned. This is now done centrally in drawing.c, and the
front end status bar function need only do what it says on the tin.
While I'm modifying the prototype of drawing_init(), I've also
renamed it drawing_new() for the same reason as random_new() (it
_allocates_ a drawing object, rather than just initialising one
passed in).
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6420
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 22 Oct 2005 17:00:35 +0000 (17:00 +0000)]
Cleanup: remove the `just_used_solve' field from a number of games
which didn't actually need it. It was originally introduced in
Fifteen to suppress animation on Solve moves, but midend.c now does
that centrally unless the game specifically instructs it otherwise.
Therefore, just_used_solve is obsolete in all games which previously
used it. (Mines was even worse: it scrupulously maintained the
correctness of the field but never used it!)
Untangle is exempt from this cleanup: its `just_solved' field is
used to change the _length_ of the animation on Solve moves, not to
suppress it entirely, and so it has to stay.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6419
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 22 Oct 2005 16:53:06 +0000 (16:53 +0000)]
Forgot to update devel.but in r6417.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6418
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 22 Oct 2005 16:52:16 +0000 (16:52 +0000)]
Cleanup: it was absolutely stupid for game_wants_statusbar() to be a
function, since it took no parameters by which to vary its decision,
and in any case it's hard to imagine a game which only
_conditionally_ wants a status bar. Changed it into a boolean data
field in the backend structure.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6417
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 22 Oct 2005 16:44:38 +0000 (16:44 +0000)]
Cleanup: remove the game_state parameter to game_colours(). No game
was actually using it, and also it wasn't being called again for
different game states or different game parameters, so it would have
been a mistake to depend on anything in that game state. Games are
now expected to commit in advance to a single fixed list of all the
colours they will ever need, which was the case in practice already
and simplifies any later port to a colour-poor platform. Also this
change has removed a lot of unnecessary faff from midend_colours().
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6416
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 22 Oct 2005 16:38:15 +0000 (16:38 +0000)]
Noticed recently that bitcount16() isn't 16-bit clean due to signed
shift right. It doesn't actually matter in the current code since
the input word only ever uses the bottom 9 bits, but if I ever
extended Mines to work in a triangular grid then all 16 bits might
be required. Fix this now, while I'm cleaning things up, so that it
won't bite me unexpectedly in future.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6415
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 22 Oct 2005 16:35:23 +0000 (16:35 +0000)]
Cleanup: the `mouse_priorities' field in the back end has been a
more general-purpose flags word for some time now. Rename it to
`flags'.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6414
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 22 Oct 2005 16:34:28 +0000 (16:34 +0000)]
OS X frontend was directly calling the backend's wants_statusbar()
function, whereas it ought to have been calling the midend's one.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6413
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 22 Oct 2005 16:27:54 +0000 (16:27 +0000)]
Cleanup: rename random_init() to random_new(), because it actually
_allocates_ a random_state rather than just initialising one passed
in by the caller.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6412
cda61777-01e9-0310-a592-
d414129be87e
simon [Fri, 21 Oct 2005 08:07:31 +0000 (08:07 +0000)]
New puzzle from James H: `Bridges', another Nikoli job.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6409
cda61777-01e9-0310-a592-
d414129be87e
simon [Mon, 17 Oct 2005 18:41:05 +0000 (18:41 +0000)]
Miscellaneous fixes. Correct a comparison of y with w causing
assertion failures in portrait-type grids; retire an unused array in
the game generation function (my original generation strategy needed
it, but the final one didn't); correct a typo; further restrict the
generable sizes of game and include a special case for 4x4dt to
prevent a tight loop.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6405
cda61777-01e9-0310-a592-
d414129be87e
simon [Mon, 17 Oct 2005 18:32:24 +0000 (18:32 +0000)]
Just noticed a longhand shuffling operation which I must have missed
when I converted them all into calls to shuffle().
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6404
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 15 Oct 2005 16:03:14 +0000 (16:03 +0000)]
Janes H provides a small workaround for a Palm tools bug.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6403
cda61777-01e9-0310-a592-
d414129be87e
simon [Sat, 15 Oct 2005 15:01:40 +0000 (15:01 +0000)]
Small error in solver diagnostics.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6402
cda61777-01e9-0310-a592-
d414129be87e
simon [Fri, 14 Oct 2005 12:23:41 +0000 (12:23 +0000)]
Revamp of the control mechanism to permit drag- as well as
click-based control. Only used for right-dragging to clear a large
area to NONTENT.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6400
cda61777-01e9-0310-a592-
d414129be87e
simon [Thu, 13 Oct 2005 18:30:24 +0000 (18:30 +0000)]
New puzzle: `Tents'. Requires a potentially shared algorithms module
maxflow.c. Also in this checkin, fixes to the OS X and GTK back ends
to get ALIGN_VNORMAL right. This is the first time I've used it! :-)
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6390
cda61777-01e9-0310-a592-
d414129be87e
simon [Thu, 13 Oct 2005 18:27:57 +0000 (18:27 +0000)]
loopy_diffnames[] isn't used, and provokes a warning on OS X.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6389
cda61777-01e9-0310-a592-
d414129be87e
simon [Wed, 12 Oct 2005 17:57:40 +0000 (17:57 +0000)]
Yikes! I've only just noticed that this copy of tree234.c was still
using unwrappered malloc/free, leaving plenty of openings for out-
of-memory segfaults. Switch to using Puzzles's memory management,
which I should have done right at the start but can only assume I
forgot about.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6388
cda61777-01e9-0310-a592-
d414129be87e
simon [Mon, 10 Oct 2005 17:22:33 +0000 (17:22 +0000)]
r6384 didn't go quite far enough. In fact, a grid square which
differs between oldstate and state in only the hint bit should not
have a flip animation even if hints_active is TRUE. Flip animations
should only happen for tiles which are changing their primary state.
(Put like that, it seems so obvious.)
Test case which demonstrates this fix to be right and r6384 to be
wrong: 3x3:
101000000000000000000,300 . Hit Solve immediately and
then click on the red-highlighted squares.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6385
cda61777-01e9-0310-a592-
d414129be87e
simon [Mon, 10 Oct 2005 16:31:26 +0000 (16:31 +0000)]
Fixes for handling human-entered Flip games. The clicked-on square
always got a flip animation even when it wasn't one of the ones
being turned, and a square with no effect at all was still counting
as a move.
Since it's an invariant of Flip's internal generator that every
square includes itself as an effect, this never comes up in auto-
generated games.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6384
cda61777-01e9-0310-a592-
d414129be87e
simon [Mon, 10 Oct 2005 16:29:58 +0000 (16:29 +0000)]
Richard Earnshaw points out that if you enter an out-of-range number
in the game description, the solver will fail to notice it and
overrun an array leading to assertion failure, silent wrong answers
or (in extreme cases) segfaults. Hence, validate_desc() now spots
them and kicks them out.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6383
cda61777-01e9-0310-a592-
d414129be87e