1126 Commits

Author SHA1 Message Date
c746f6d0e3 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).

[originally from svn r7700]
2007-08-25 14:10:49 +00:00
4ff90bd47f Ahem. Finishing writing the comment _before_ checkin is generally sensible.
[originally from svn r7694]
2007-08-18 13:32:56 +00:00
4c1e3ca7cb 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.

[originally from svn r7693]
2007-08-18 13:30:13 +00:00
333d57bf6e Better test-mode diagnostics.
[originally from svn r7691]
2007-08-18 11:19:29 +00:00
cc54c09413 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'.

[originally from svn r7690]
2007-08-18 10:07:29 +00:00
2842817eda 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.

[originally from svn r7656]
2007-07-31 17:04:20 +00:00
519b7de973 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.

[originally from svn r7636]
2007-07-05 18:57:50 +00:00
d9c4a9b659 Optimiser placation.
[originally from svn r7625]
2007-06-29 09:45:44 +00:00
1c42aec234 Updates and improvements from Jonas Koelker.
[originally from svn r7601]
2007-05-20 14:28:48 +00:00
399ac356bd Left puzzles.rc2 out of the tarball. Oops.
[originally from svn r7600]
2007-05-19 06:16:24 +00:00
e6116563bd More forgiving selection of dragging targets.
[originally from svn r7574]
2007-05-12 13:13:39 +00:00
be8f9c5284 Graphics tweak: make the top-right and bottom-left corners of
everything look nicer.

[originally from svn r7573]
2007-05-12 11:51:39 +00:00
143081d296 In-game user interface to the solver.
[originally from svn r7572]
2007-05-12 10:26:22 +00:00
5b8b855376 Fix tiny memory leak if you pressed Solve while part way through an
existing solution path.

[originally from svn r7571]
2007-05-12 08:26:58 +00:00
81e3a145bf Remove the check for disconnected pieces; it's over-general and
triggers on a perfectly connected piece shaped like an inverted T.

[originally from svn r7570]
2007-05-12 08:14:37 +00:00
05a0cf0684 noicon.rc was missing from the Unix source archive, which caused a
re-run of mkfiles.pl to fail.

[originally from svn r7567]
2007-05-10 11:10:14 +00:00
81ccb144eb Stand-alone slidesolver.
[originally from svn r7558]
2007-05-07 19:36:19 +00:00
f7d2c94138 Add an optional move limit during game generation.
[originally from svn r7554]
2007-05-07 19:08:52 +00:00
2d30316b76 Slight solver speedup by tracking more carefully which block merges
we've already tried, and not trying them again.

[originally from svn r7553]
2007-05-07 17:51:37 +00:00
ab80d0b7fd Add a new misc.c function needed by Slide's colour setup.
[originally from svn r7552]
2007-05-07 17:50:14 +00:00
7fce4f57c2 Close-to-finished auto-generating implementation of Klotski.
[originally from svn r7547]
2007-05-07 14:49:05 +00:00
6da8849110 I still haven't managed to get the WinCE port building via bob, but
I should at least check in what I've got.

[originally from svn r7542]
2007-05-06 09:54:34 +00:00
61395a5141 Ensure the shuffling process never produces an already-solved grid.
[originally from svn r7446]
2007-04-04 19:12:17 +00:00
f6a7276495 In the Windows frontend, stop tab navigation from activating buttons.
[originally from svn r7436]
2007-03-31 16:00:50 +00:00
9885a86a27 Er, and now do that _without_ introducing further segfaults.
[originally from svn r7409]
2007-03-26 10:24:25 +00:00
0589681d9d Stop failing assertions when we encounter an insoluble puzzle.
[originally from svn r7408]
2007-03-26 10:20:51 +00:00
5fb108db00 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.

[originally from svn r7407]
2007-03-23 18:08:21 +00:00
02cd67ecb6 Disallow clicks between squares.
[originally from svn r7400]
2007-03-16 13:32:43 +00:00
67b37596c2 r7364 failed to expand a malloc to match the larger data being put
in it.

[originally from svn r7387]
[r7364 == 39d299f579da3e91308d63acc78c68ab74666989]
2007-03-11 10:39:44 +00:00
f7e755628b 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.

[originally from svn r7386]
2007-03-11 10:12:45 +00:00
4212ef4bd2 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.

[originally from svn r7385]
2007-03-11 10:04:00 +00:00
d0a824540b Since we've changed the semantics of the `expand' argument to midend_size(),
change the name. Also document the new semantics.

[originally from svn r7369]
2007-03-03 23:43:22 +00:00
8b21ddc396 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.)

[originally from svn r7368]
2007-03-03 23:17:35 +00:00
c1b0c1d091 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.

[originally from svn r7367]
2007-03-03 22:39:17 +00:00
d916cd7ff9 Refactoring patch from Ben Hutchings: move all the Gtk resize code into one
place. (From Debian bug#379452)

[originally from svn r7366]
2007-03-03 22:05:05 +00:00
39d299f579 Patch from James H to provide resizability on Windows.
[originally from svn r7364]
2007-03-03 17:36:44 +00:00
8d710851de Minor cleanups (mostly \ns in diagnostic printfs) from James H.
[originally from svn r7363]
2007-03-03 17:25:13 +00:00
587d105799 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.

[originally from svn r7362]
2007-03-03 17:15:25 +00:00
6a361ce734 About time I got round to documenting the new
REQUIRE_{RBUTTON,NUMPAD} flags.

[originally from svn r7356]
2007-03-03 09:41:51 +00:00
6713d21cd1 Fix problems with arrow UI with non-square grid.
[originally from svn r7355]
2007-03-02 20:14:15 +00:00
3584fc5a1b 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.

[originally from svn r7354]
2007-03-01 18:57:36 +00:00
2fc204c1e2 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.

[originally from svn r7352]
2007-03-01 13:29:53 +00:00
db743e54e8 Cleanup patch from James H: disable the `s' key, which was only in
there by accident.

[originally from svn r7351]
2007-03-01 07:41:11 +00:00
f5dedef552 Adam D. Lopresto and Phil Bordelon independently point out a
signedness mismatch.

[originally from svn r7350]
2007-03-01 07:39:05 +00:00
cf0b0b747b Bound edge thicknesses below so that they're always thicker than the
grid lines.

[originally from svn r7349]
2007-03-01 07:32:35 +00:00
682ea218de Fix some border drawing issues.
[originally from svn r7347]
2007-02-28 22:22:30 +00:00
3940c22d49 MinGW windres doesn't like an empty resource file, so invent a resource to
keep it happy. (Hopefully this hack will be temporary.)

[originally from svn r7346]
2007-02-28 21:49:48 +00:00
9287d95d08 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

[originally from svn r7344]
2007-02-28 21:19:15 +00:00
de5ccc9352 Gary Wong points out a couple of minor errors in the setting of
`used_solve'.

[originally from svn r7343]
2007-02-28 21:02:31 +00:00
e663595a5c 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).

[originally from svn r7341]
2007-02-27 21:03:06 +00:00