sgt/puzzles
16 years agoPedantic tweaks to allow successful compilation on Windows. (gcc
simon [Mon, 7 Apr 2008 17:12:21 +0000 (17:12 +0000)]
Pedantic tweaks to allow successful compilation on Windows. (gcc
failed to point out a declaration after a statement, and gcc's
linker was clever enough to optimise the call to divvy_rectangle()
out of solosolver so that I didn't have to include divvy.c in that.)

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

16 years agoSubstantial reworking of Solo so that it implements both Sudoku-X
simon [Mon, 7 Apr 2008 15:56:42 +0000 (15:56 +0000)]
Substantial reworking of Solo so that it implements both Sudoku-X
(require both main diagonals to have one of every digit in addition
to all the usual constraints) and Jigsaw Sudoku (replace the array
of rectangular sub-blocks with the sub-blocks being random
polyominoes). To implement the latter, I've moved my `divvy.c'
library routine out of the `unfinished' subdirectory.

Jigsaw mode is currently an undocumented feature: you enable it by
setting the rows parameter to 1 (and the columns parameter to your
desired grid size, which unlike normal Sudoku can be anything you
like including a prime number). The reason it's undocumented is
because generation times are not yet reliably short: sometimes
generating a jigsaw-type puzzle can hang for hours and still get
nowhere. (The algorithm should terminate in principle, but not in
any time you're prepared to wait.) I _think_ I know how to solve
this, but have yet to try it. Until then, jigsaw mode will remain a
hidden feature.

Printing of X-type puzzles is also substandard at present, because
the current print-colour API replaces the desired light shading of
the X-cells with heavy diagonal hatching. I plan to adjust the API
imminently to address this.

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

16 years agoHmm. Telling xvfb to default to a TrueColor visual did help, in that
simon [Thu, 20 Mar 2008 09:18:26 +0000 (09:18 +0000)]
Hmm. Telling xvfb to default to a TrueColor visual did help, in that
it got rid of the bogus backgrounds on all the text; but on the
other hand it mysteriously caused all the images to become black and
white! Serves me right for testing with Bridges which was B&W to
start with. Instead, we'll just tell xvfb to use a 24-bit display
and let it sort out the visuals for itself; that seems to work better.

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

16 years agoI _think_, after some fairly random experimentation, that this ought
simon [Thu, 20 Mar 2008 00:19:27 +0000 (00:19 +0000)]
I _think_, after some fairly random experimentation, that this ought
to fix the weird blacked-out text in the xvfb-built screenshots.

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

16 years agoUpdate the OS X Puzzles makefile so that it builds on Leopard and
simon [Tue, 11 Mar 2008 17:59:38 +0000 (17:59 +0000)]
Update the OS X Puzzles makefile so that it builds on Leopard and
generates PPC/Intel dual-architecture binaries.

This turns out not to be too painful: you compile and link your
programs using `gcc -arch ppc' or `gcc -arch i386', then you use a
command of the form `lipo -create ppc-binary i386-binary -output
binary' to construct a universal binary. It works equally well on
command-line standalone executable files and the executables within
application directories. Also added the -mmacosx-version-min option,
since otherwise the OS X build tools appear to default to building
binaries which will crash (without anything resembling a
comprehensible error message) on any earlier release.

The handling of version.o in this checkin is somewhat grotty. I'd
prefer a method more cleverly intertwingled with mkfiles.pl so I
didn't have to maintain the OS X architecture list in both
mkfiles.pl and Recipe. (Not that I anticipate Apple switching
architectures again in the immediate future, but it's the principle
of the thing.)

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

16 years agoUI change to Filling: allow multiple squares to be set at once.
jacob [Sun, 10 Feb 2008 18:43:29 +0000 (18:43 +0000)]
UI change to Filling: allow multiple squares to be set at once.

(This change adds a new possibility to the save format, such that new save
files won't necessarily be loadable by old binaries. I think that's acceptable
-- it's certainly happened before -- but I couldn't find anything in the
developer docs explicitly blessing it.)

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

16 years agoIt's another new year.
jacob [Sun, 10 Feb 2008 17:12:49 +0000 (17:12 +0000)]
It's another new year.

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

16 years agoSyntactic fixes by Zach Wily to make the OS X build work under 10.5.
simon [Tue, 15 Jan 2008 18:04:13 +0000 (18:04 +0000)]
Syntactic fixes by Zach Wily to make the OS X build work under 10.5.

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

16 years ago64-bit cleanliness: we were already carefully using a uint32 type in
simon [Sat, 15 Dec 2007 21:09:45 +0000 (21:09 +0000)]
64-bit cleanliness: we were already carefully using a uint32 type in
the SHA code, but it wasn't correctly defined!

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

16 years agoA rigorous proof. Totally unimportant to the code, but I didn't want
simon [Sat, 25 Aug 2007 17:46:13 +0000 (17:46 +0000)]
A rigorous proof. Totally unimportant to the code, but I didn't want
to lose it :-)

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

16 years agoFix an inaccurate comment.
simon [Sat, 25 Aug 2007 15:50:33 +0000 (15:50 +0000)]
Fix an inaccurate comment.

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

16 years agoI've just realised that my deliberate avoidance of non-simply
simon [Sat, 25 Aug 2007 15:32:41 +0000 (15:32 +0000)]
I've just realised that my deliberate avoidance of non-simply
connected polyominoes actually causes a loss of generality for
sufficiently large k. I hadn't previously noticed, because you need
k to be (I think) at least 23 and none of my potential applications
require anything nearly that large. Add some discussion of this.

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

16 years agoCommit my work so far on a generator for Nikoli's `Block Puzzle'. It
simon [Sat, 25 Aug 2007 14:10:49 +0000 (14:10 +0000)]
Commit my work so far on a generator for Nikoli's `Block Puzzle'. It
works, but it's slow, and the puzzles are currently at a relatively
low level of difficulty. Also this is a generator only: no UI yet
(because I'm waiting to see if I can make the generator practical
before bothering to write the rest).

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

16 years agoAhem. Finishing writing the comment _before_ checkin is generally sensible.
simon [Sat, 18 Aug 2007 13:32:56 +0000 (13:32 +0000)]
Ahem. Finishing writing the comment _before_ checkin is generally sensible.

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

16 years agoAllow a 1-omino to be completely destroyed and recreated in an
simon [Sat, 18 Aug 2007 13:30:13 +0000 (13:30 +0000)]
Allow a 1-omino to be completely destroyed and recreated in an
arbitrary unclaimed square. This cures the most common cause of
generation failures (covering a large area in dominoes was the most
difficult case, and would fail even if the large area was 1xn!); the
failure rate is now sufficiently low under all circumstances I've
found that I'm willing to just loop until I get a success.

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

16 years agoBetter test-mode diagnostics.
simon [Sat, 18 Aug 2007 11:19:29 +0000 (11:19 +0000)]
Better test-mode diagnostics.

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

16 years agoA piece of library code which constructs a random division of a
simon [Sat, 18 Aug 2007 10:07:29 +0000 (10:07 +0000)]
A piece of library code which constructs a random division of a
rectangle into equally sized ominoes. I have a couple of potential
applications for this, but none I've actually implemented yet, so
for the moment it's living in `unfinished'.

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

16 years agoExperimental UI tweak enabled by a hacky environment variable:
simon [Tue, 31 Jul 2007 17:04:20 +0000 (17:04 +0000)]
Experimental UI tweak enabled by a hacky environment variable:
suppress the display of `this square can't be a light' blobs in a
lit square, on the grounds that we already know _lit_ squares can't
be lights. This makes the solved game look cleaner (I've always
thought the detritus of blobs on some but not all non-light squares
looked messy), but on the other hand it's slightly jarring during
play. So I'm checking it in, but as a configurable option which is
off by default.

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

16 years agoA user points out that Loopy's solver relies on elements of the
simon [Thu, 5 Jul 2007 18:57:50 +0000 (18:57 +0000)]
A user points out that Loopy's solver relies on elements of the
`clues' array being able to be -1, so we must explicitly declare it
as `signed char' or it will break on platforms whose default char is
unsigned.

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

16 years agoOptimiser placation.
simon [Fri, 29 Jun 2007 09:45:44 +0000 (09:45 +0000)]
Optimiser placation.

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

17 years agoUpdates and improvements from Jonas Koelker.
simon [Sun, 20 May 2007 14:28:48 +0000 (14:28 +0000)]
Updates and improvements from Jonas Koelker.

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

17 years agoLeft puzzles.rc2 out of the tarball. Oops.
simon [Sat, 19 May 2007 06:16:24 +0000 (06:16 +0000)]
Left puzzles.rc2 out of the tarball. Oops.

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

17 years agoMore forgiving selection of dragging targets.
simon [Sat, 12 May 2007 13:13:39 +0000 (13:13 +0000)]
More forgiving selection of dragging targets.

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

17 years agoGraphics tweak: make the top-right and bottom-left corners of
simon [Sat, 12 May 2007 11:51:39 +0000 (11:51 +0000)]
Graphics tweak: make the top-right and bottom-left corners of
everything look nicer.

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

17 years agoIn-game user interface to the solver.
simon [Sat, 12 May 2007 10:26:22 +0000 (10:26 +0000)]
In-game user interface to the solver.

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

17 years agoFix tiny memory leak if you pressed Solve while part way through an
simon [Sat, 12 May 2007 08:26:58 +0000 (08:26 +0000)]
Fix tiny memory leak if you pressed Solve while part way through an
existing solution path.

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

17 years agoRemove the check for disconnected pieces; it's over-general and
simon [Sat, 12 May 2007 08:14:37 +0000 (08:14 +0000)]
Remove the check for disconnected pieces; it's over-general and
triggers on a perfectly connected piece shaped like an inverted T.

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

17 years agonoicon.rc was missing from the Unix source archive, which caused a
simon [Thu, 10 May 2007 11:10:14 +0000 (11:10 +0000)]
noicon.rc was missing from the Unix source archive, which caused a
re-run of mkfiles.pl to fail.

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

17 years agoStand-alone slidesolver.
simon [Mon, 7 May 2007 19:36:19 +0000 (19:36 +0000)]
Stand-alone slidesolver.

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

17 years agoAdd an optional move limit during game generation.
simon [Mon, 7 May 2007 19:08:52 +0000 (19:08 +0000)]
Add an optional move limit during game generation.

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

17 years agoSlight solver speedup by tracking more carefully which block merges
simon [Mon, 7 May 2007 17:51:37 +0000 (17:51 +0000)]
Slight solver speedup by tracking more carefully which block merges
we've already tried, and not trying them again.

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

17 years agoAdd a new misc.c function needed by Slide's colour setup.
simon [Mon, 7 May 2007 17:50:14 +0000 (17:50 +0000)]
Add a new misc.c function needed by Slide's colour setup.

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

17 years agoClose-to-finished auto-generating implementation of Klotski.
simon [Mon, 7 May 2007 14:49:05 +0000 (14:49 +0000)]
Close-to-finished auto-generating implementation of Klotski.

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

17 years agoI still haven't managed to get the WinCE port building via bob, but
simon [Sun, 6 May 2007 09:54:34 +0000 (09:54 +0000)]
I still haven't managed to get the WinCE port building via bob, but
I should at least check in what I've got.

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

17 years agoEnsure the shuffling process never produces an already-solved grid.
simon [Wed, 4 Apr 2007 19:12:17 +0000 (19:12 +0000)]
Ensure the shuffling process never produces an already-solved grid.

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

17 years agoIn the Windows frontend, stop tab navigation from activating buttons.
jacob [Sat, 31 Mar 2007 16:00:50 +0000 (16:00 +0000)]
In the Windows frontend, stop tab navigation from activating buttons.

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

17 years agoEr, and now do that _without_ introducing further segfaults.
simon [Mon, 26 Mar 2007 10:24:25 +0000 (10:24 +0000)]
Er, and now do that _without_ introducing further segfaults.

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

17 years agoStop failing assertions when we encounter an insoluble puzzle.
simon [Mon, 26 Mar 2007 10:20:51 +0000 (10:20 +0000)]
Stop failing assertions when we encounter an insoluble puzzle.

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

17 years agoKyle Brazell points out that the completion checker considers a
simon [Fri, 23 Mar 2007 18:08:21 +0000 (18:08 +0000)]
Kyle Brazell points out that the completion checker considers a
region valid if it has _a_ dot at its centre of symmetry, even if
that dot isn't actually within the region in question.

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

17 years agoDisallow clicks between squares.
jacob [Fri, 16 Mar 2007 13:32:43 +0000 (13:32 +0000)]
Disallow clicks between squares.

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

17 years agor7364 failed to expand a malloc to match the larger data being put
simon [Sun, 11 Mar 2007 10:39:44 +0000 (10:39 +0000)]
r7364 failed to expand a malloc to match the larger data being put
in it.

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

17 years agoGary Wong observes that solo's decode_params() is overenthusiastic
simon [Sun, 11 Mar 2007 10:12:45 +0000 (10:12 +0000)]
Gary Wong observes that solo's decode_params() is overenthusiastic
about eating the letter `d' (for `diagonal') when it appears in a
symmtery description: it should only be used after `m', because
mirror symmetry is the only type that can be diagonal. This was
causing parsing of the parameter description `3x3adu' to produce the
wrong answer: the d would be swallowed, then the u ignored for being
incomprehensible, and you'd get default Trivial difficulty.

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

17 years agoGary Wong points out that solosolver's verbose output is
simon [Sun, 11 Mar 2007 10:04:00 +0000 (10:04 +0000)]
Gary Wong points out that solosolver's verbose output is
inconsistent in whether it numbers rows and columns from zero or
from one. Standardise on one.

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

17 years agoSince we've changed the semantics of the `expand' argument to midend_size(),
jacob [Sat, 3 Mar 2007 23:43:22 +0000 (23:43 +0000)]
Since we've changed the semantics of the `expand' argument to midend_size(),
change the name. Also document the new semantics.

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

17 years agoPatch from Ben Hutchings to allow user-initiated tilesize changes to persist
jacob [Sat, 3 Mar 2007 23:17:35 +0000 (23:17 +0000)]
Patch from Ben Hutchings to allow user-initiated tilesize changes to persist
across changes in game parameters (e.g., changing difficulty without changing
size). This also has the effect of preserving the user-selected tilesize if the
grid size is changed. (From Debian bug#379452.)

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

17 years agoBen Hutchings' patch to allow Gtk windows to be shrunk as well as grown
jacob [Sat, 3 Mar 2007 22:39:17 +0000 (22:39 +0000)]
Ben Hutchings' patch to allow Gtk windows to be shrunk as well as grown
(from Debian bug#379452).
Tested on Gtk 2. I've been unable to find a Gtk+-1.2 installation on which
Puzzles compiles, so not tested there.

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

17 years agoRefactoring patch from Ben Hutchings: move all the Gtk resize code into one
jacob [Sat, 3 Mar 2007 22:05:05 +0000 (22:05 +0000)]
Refactoring patch from Ben Hutchings: move all the Gtk resize code into one
place. (From Debian bug#379452)

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

17 years agoPatch from James H to provide resizability on Windows.
simon [Sat, 3 Mar 2007 17:36:44 +0000 (17:36 +0000)]
Patch from James H to provide resizability on Windows.

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

17 years agoMinor cleanups (mostly \ns in diagnostic printfs) from James H.
simon [Sat, 3 Mar 2007 17:25:13 +0000 (17:25 +0000)]
Minor cleanups (mostly \ns in diagnostic printfs) from James H.

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

17 years agoMy favourite kind of patch, from James H: one which decreases the
simon [Sat, 3 Mar 2007 17:15:25 +0000 (17:15 +0000)]
My favourite kind of patch, from James H: one which decreases the
amount of code. James has ripped out the solver's version of
check_complete(), in favour of using the one I wrote for the
game-playing UI. My one checks connectedness, which means that the
solver will now not believe non-solutions to puzzles where
connectedness becomes a difficult issue. Examples of game IDs which
are now solved correctly but were previously not are 5x3:ubb and
7x7:ajfzmfqgtdzgt.

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

17 years agoAbout time I got round to documenting the new
simon [Sat, 3 Mar 2007 09:41:51 +0000 (09:41 +0000)]
About time I got round to documenting the new
REQUIRE_{RBUTTON,NUMPAD} flags.

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

17 years agoFix problems with arrow UI with non-square grid.
jacob [Fri, 2 Mar 2007 20:14:15 +0000 (20:14 +0000)]
Fix problems with arrow UI with non-square grid.

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

17 years agoSilliness! Here's a somewhat hacky patch which builds an additional
simon [Thu, 1 Mar 2007 18:57:36 +0000 (18:57 +0000)]
Silliness! Here's a somewhat hacky patch which builds an additional
binary from the Galaxies source file. The function of the new
`galaxiespicture' is to take a .xbm bitmap on standard input and
convert it into a Galaxies game ID using both black and white dots,
such that when solved the puzzle displays the input bitmap.

In the process of this I've implemented a post-processing pass after
the main game generation, to prevent clusters of adjacent
singletons. James H already solved that problem for unconstrained
game generation, but for some reason it came back when I did this.
However, the post-processing pass is still turned off for normal
usage, on the basis that (a) if it ain't broke don't fix it, and (b)
it's rather slow and best avoided if not necessary.

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

17 years agoAmend README so that it makes reasonable sense no matter whether
simon [Thu, 1 Mar 2007 13:29:53 +0000 (13:29 +0000)]
Amend README so that it makes reasonable sense no matter whether
you've got your source code from a tarball (with makefiles) or from
svn (without makefiles). While I'm here, mention Makefile.wce.

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

17 years agoCleanup patch from James H: disable the `s' key, which was only in
simon [Thu, 1 Mar 2007 07:41:11 +0000 (07:41 +0000)]
Cleanup patch from James H: disable the `s' key, which was only in
there by accident.

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

17 years agoAdam D. Lopresto and Phil Bordelon independently point out a
simon [Thu, 1 Mar 2007 07:39:05 +0000 (07:39 +0000)]
Adam D. Lopresto and Phil Bordelon independently point out a
signedness mismatch.

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

17 years agoBound edge thicknesses below so that they're always thicker than the
simon [Thu, 1 Mar 2007 07:32:35 +0000 (07:32 +0000)]
Bound edge thicknesses below so that they're always thicker than the
grid lines.

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

17 years agoFix some border drawing issues.
jacob [Wed, 28 Feb 2007 22:22:30 +0000 (22:22 +0000)]
Fix some border drawing issues.

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

17 years agoMinGW windres doesn't like an empty resource file, so invent a resource to
jacob [Wed, 28 Feb 2007 21:49:48 +0000 (21:49 +0000)]
MinGW windres doesn't like an empty resource file, so invent a resource to
keep it happy. (Hopefully this hack will be temporary.)

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

17 years agoGeneral cleanups patch from James H:
simon [Wed, 28 Feb 2007 21:19:15 +0000 (21:19 +0000)]
General cleanups patch from James H:
 - missing static in filling.c
 - better robustness in execute_move() in filling.c
 - remove side effects in assert statements
 - remove rogue diagnostic in galaxies.c
 - remove // comment in map.c
 - add more stylus-friendly UI to Pattern
 - bias Unequal towards generating inequality clues rather than numeric

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

17 years agoGary Wong points out a couple of minor errors in the setting of
simon [Wed, 28 Feb 2007 21:02:31 +0000 (21:02 +0000)]
Gary Wong points out a couple of minor errors in the setting of
`used_solve'.

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

17 years agoProvide my old drag-based interface to Net as an ifdef-enabled
simon [Tue, 27 Feb 2007 21:03:06 +0000 (21:03 +0000)]
Provide my old drag-based interface to Net as an ifdef-enabled
option, and turn it on by default on stylus-based platforms (i.e.
currently PocketPC).

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

17 years agoAnother thing to watch out for when adding new puzzles.
simon [Tue, 27 Feb 2007 20:52:03 +0000 (20:52 +0000)]
Another thing to watch out for when adding new puzzles.

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

17 years agoCreate a blank .rc file to be used in the absence of icons/foo.rc.
simon [Tue, 27 Feb 2007 20:49:40 +0000 (20:49 +0000)]
Create a blank .rc file to be used in the absence of icons/foo.rc.
This means that puzzles.rc2 is always included in all Windows and
PocketPC builds, which in turn means that I should be able to start
filling it full of VERSIONINFO and have that reliably included as
well.

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

17 years agoThis game requires the numpad.
simon [Tue, 27 Feb 2007 20:46:15 +0000 (20:46 +0000)]
This game requires the numpad.

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

17 years agoDariusz Olszewski's changes to support compiling for PocketPC. This
simon [Mon, 26 Feb 2007 20:35:47 +0000 (20:35 +0000)]
Dariusz Olszewski's changes to support compiling for PocketPC. This
is mostly done with ifdefs in windows.c; so mkfiles.pl generates a
new makefile (Makefile.wce) and Recipe enables it, but it's hardly
any different from Makefile.vc apart from a few definitions at the
top of the files.

Currently the PocketPC build is not enabled in the build script, but
with any luck I'll be able to do so reasonably soon.

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

17 years agoAfter it confused Verity, clarify in the Unequal docs that the
simon [Sun, 25 Feb 2007 23:30:14 +0000 (23:30 +0000)]
After it confused Verity, clarify in the Unequal docs that the
Trivial and Recursive difficulty levels are available for custom
selection even though no preset uses them.

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

17 years agoHardwiring the grid line width to 1 is really bad for printing. Use
simon [Sun, 25 Feb 2007 15:57:35 +0000 (15:57 +0000)]
Hardwiring the grid line width to 1 is really bad for printing. Use
a slightly more conventional method of drawing the grid lines, and
thereby fix printing.

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

17 years agoGalaxies doesn't print in colour.
simon [Sun, 25 Feb 2007 15:50:24 +0000 (15:50 +0000)]
Galaxies doesn't print in colour.

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

17 years agoDon't create an undo-chain entry for a move with no effect.
simon [Sun, 25 Feb 2007 13:00:58 +0000 (13:00 +0000)]
Don't create an undo-chain entry for a move with no effect.

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

17 years agoFix a UI glitch where dragging an existing arrow could change what it
jacob [Sun, 25 Feb 2007 12:54:46 +0000 (12:54 +0000)]
Fix a UI glitch where dragging an existing arrow could change what it
referred to.

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

17 years agoTweak the cropping of the Filling icon very slightly.
simon [Sun, 25 Feb 2007 12:18:20 +0000 (12:18 +0000)]
Tweak the cropping of the Filling icon very slightly.

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

17 years agoUpdate the checklist (yet again) to try to prevent a recurrence of
simon [Sun, 25 Feb 2007 12:12:35 +0000 (12:12 +0000)]
Update the checklist (yet again) to try to prevent a recurrence of
the error I corrected in r7328.

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

17 years agoForgot to enable the Windows icon.
simon [Sun, 25 Feb 2007 12:11:47 +0000 (12:11 +0000)]
Forgot to enable the Windows icon.

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

17 years agoMore updates to the new-puzzle checklist.
simon [Sun, 25 Feb 2007 12:04:42 +0000 (12:04 +0000)]
More updates to the new-puzzle checklist.

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

17 years agoNew puzzle: `Filling', a Fillomino implementation by Jonas Koelker.
simon [Sun, 25 Feb 2007 11:37:05 +0000 (11:37 +0000)]
New puzzle: `Filling', a Fillomino implementation by Jonas Koelker.

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

17 years agoMore ignores.
simon [Sun, 25 Feb 2007 11:03:29 +0000 (11:03 +0000)]
More ignores.

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

17 years agoOops. Having built the installer, we need a redirect for it in
simon [Sun, 25 Feb 2007 10:10:51 +0000 (10:10 +0000)]
Oops. Having built the installer, we need a redirect for it in
.htaccess.

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

17 years agoBuild an installer for Puzzles.
simon [Sat, 24 Feb 2007 19:33:38 +0000 (19:33 +0000)]
Build an installer for Puzzles.

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

17 years agoSomehow I let a couple of // comments get past me when I accepted
simon [Sat, 24 Feb 2007 17:34:21 +0000 (17:34 +0000)]
Somehow I let a couple of // comments get past me when I accepted
this file. Remove them.

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

17 years agoUpdate ignore property. (Again.)
simon [Fri, 23 Feb 2007 10:42:01 +0000 (10:42 +0000)]
Update ignore property. (Again.)

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

17 years agoPhil Bordelon points out that when I renamed `Recursive' I missed a
simon [Thu, 22 Feb 2007 23:18:51 +0000 (23:18 +0000)]
Phil Bordelon points out that when I renamed `Recursive' I missed a
bit.

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

17 years agoRemove spurious semicolons from macros; their upset compilers that don't like
jacob [Thu, 22 Feb 2007 21:31:59 +0000 (21:31 +0000)]
Remove spurious semicolons from macros; their upset compilers that don't like
mixing declarations and code (I accidentally tried to compile it with one
such).

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

17 years agoAnd fix the error _I_ made in r7311. I should stop coding now,
simon [Thu, 22 Feb 2007 19:05:10 +0000 (19:05 +0000)]
And fix the error _I_ made in r7311. I should stop coding now,
because I'm clearly too sleepy to get it right.

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

17 years agoPart of r7310 completely changed the careful semantics of my
simon [Thu, 22 Feb 2007 18:59:15 +0000 (18:59 +0000)]
Part of r7310 completely changed the careful semantics of my
coordinate-rounding, causing picking up arrows from a dot anywhere
other than at the centre of a square to break.

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

17 years agoPatch from James H to make the Palm compiler stop objecting to my
simon [Thu, 22 Feb 2007 18:13:12 +0000 (18:13 +0000)]
Patch from James H to make the Palm compiler stop objecting to my
(as far as I could tell) perfectly legal use of floats, and also
remove some VC warnings.

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

17 years agoWe may reluctantly permit the returning of a too-easy puzzle if an
simon [Thu, 22 Feb 2007 18:09:51 +0000 (18:09 +0000)]
We may reluctantly permit the returning of a too-easy puzzle if an
adequately hard one couldn't be found, but we must never return a
puzzle harder than the user asked for, and we _certainly_ mustn't
return one that we aren't even sure has a unique solution.

However, when I attempted to implement this rule, it turned out that
an attempt to generate a 15x15 Easy puzzle didn't terminate before I
got bored and killed it. I'm therefore retiring the Easy difficulty
level on the grounds that it's not a wide enough band to be useful.
I've renamed Hard to Normal, and (while I was there) renamed
Recursive to Unreasonable in line with my normal practice.

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

17 years agoJames H forgot to credit himself for Galaxies!
simon [Thu, 22 Feb 2007 10:06:59 +0000 (10:06 +0000)]
James H forgot to credit himself for Galaxies!

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

17 years agoUpdate the new-puzzle checklist for the post-bob world.
simon [Thu, 22 Feb 2007 09:54:52 +0000 (09:54 +0000)]
Update the new-puzzle checklist for the post-bob world.

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

17 years agoMissing uses of \q{}.
simon [Thu, 22 Feb 2007 09:50:33 +0000 (09:50 +0000)]
Missing uses of \q{}.

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

17 years agoAdd James Harvey's excellent new puzzle, `Galaxies'.
simon [Thu, 22 Feb 2007 09:31:43 +0000 (09:31 +0000)]
Add James Harvey's excellent new puzzle, `Galaxies'.

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

17 years agoForgot to shuffle the num[] array! That was probably introducing
simon [Mon, 19 Feb 2007 19:38:00 +0000 (19:38 +0000)]
Forgot to shuffle the num[] array! That was probably introducing
some really subtle probabilistic bias in the generated latin squares.

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

17 years agoReplicate r7285 from PuTTY: make keyboard input work in HTML Help.
jacob [Tue, 13 Feb 2007 23:01:50 +0000 (23:01 +0000)]
Replicate r7285 from PuTTY: make keyboard input work in HTML Help.

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

17 years agoNow we have the new `module' command, use it.
simon [Mon, 5 Feb 2007 12:41:21 +0000 (12:41 +0000)]
Now we have the new `module' command, use it.

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

17 years agoReinstate the icons in the Windows binaries.
simon [Sun, 4 Feb 2007 14:35:23 +0000 (14:35 +0000)]
Reinstate the icons in the Windows binaries.

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

17 years agoForgot to tag the Mac and Windows binaries with the revision number.
simon [Sun, 4 Feb 2007 14:03:52 +0000 (14:03 +0000)]
Forgot to tag the Mac and Windows binaries with the revision number.

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

17 years agoLooking for puzzles*.tar.gz in the right directory is liable to make
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

17 years agoBuild script for Puzzles using bob. I've also added a piece of extra
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

17 years agoMisdirected cross-reference spotted by Jonas Koelker.
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

17 years agoMarcin Wojdyr points out that the use of `>&' to redirect both
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