193 Commits

Author SHA1 Message Date
09f2052fbf guess: Much more efficient keyboard interface
Now rather than mucking around with the cursor keys, you can just type a
four-digit number and press Enter.  Of course, if you still want to muck
around with the cursor keys they work the same as before.

Since Backspace was already assigned to clear the peg under the cursor,
I haven't co-opted it for the obvious action of clearing the peg to the
left of the cursor and moving the cursor left.  The left arrow key is a
reasonable alternative anyway.

For consistency, 'L' now labels the pegs with numbers rather than
letters, and is documented.
2022-12-07 00:43:45 +00:00
a8df0189ff guess: Correct documentation to not say Space places a peg
It sets a hold now, as is mentioned in the next sentence.
2022-12-07 00:38:17 +00:00
7e19d6f4b1 Document new new undo/redo keys 2022-11-16 09:27:40 +00:00
4feb5fdf0c Update Nikoli links and remove Flash warnings
Most of the old URLs don't work any more.  As far as I can see, the
new pages have no Flash, and even if they did very few browsers will
still support it.
2022-10-22 01:43:51 +01:00
640f9235c7 Pearl: document game options.
A user spotted that this docs section was missing all its useful
content.
2021-10-30 10:56:15 +01:00
2409a9913e Update copyright years.
They'd got quite out of date, oops.
2021-04-25 22:00:12 +01:00
c6a48bfc1c Docs: fix Mosaic copy-and-paste error. 2021-04-25 11:17:13 +01:00
0377184510 New puzzle: 'Mosaic'.
This is similar in concept to Minesweeper, in that each clue tells you
the number of things (in this case, just 'black squares') in the
surrounding 3x3 grid section.

But unlike Minesweeper, there's no separation between squares that can
contain clues, and squares that can contain the things you're looking
for - a clue square may or may not itself be coloured black, and if
so, its clue counts itself.

So there's also no hidden information: the clues can all be shown up
front, and the difficulty arises from the game generator choosing
which squares to provide clues for at all.

Contributed by a new author, Didi Kohen. Currently only has one
difficulty level, but harder ones would be possible to add later.
2021-04-25 09:59:15 +01:00
b443a84efe Add printing support for GTK.
Printing is only available in GTK versions >= 2.10. We can only embed
the page setup dialog on GTK >= 2.18, so on a GTK version less than
that, we must use a separate page setup dialog.

In GTK, printing is usually done one page at a time, so also modify
printing.c to allow printing of a single page at a time.

Create a separate drawing API for drawing to the screen and for
printing. Create a vtable for functions which need to be different
depending on whether they were called from the printing or drawing
API.

When a function is called from the printing API, it is passed a
separate instance of the frontend than if it were called from the
drawing API. In that instance of the frontend, an appropriate vtable
is available depending on whether it was called from the printing or
drawing API.

The low-level functions used for printing are enabled even if printing
is not enabled. This is in case we ever need to use them for something
other than printing with GTK. For example, using Cairo as a printing
backend when printing from the command line. Enabling the low-level
functions even when GTK printing is not available also allows them to
be compiled under as many build settings as possible, and thus lowers
the chance of undetected breakage.

Move the definition of ROOT2 from ps.c to puzzles.h so other files can
use it (gtk.c needs it for hatching).

Also add myself to the copyright list.

[Committer's note: by 'printing', this log message refers to the GTK
GUI printing system, which handles selecting a printer, printing to a
file, previewing and so on. The existing facility to generate
printable puzzles in Postscript form by running the GTK binaries in
command-line mode with the --print option is unaffected. -SGT]
2019-12-30 08:10:34 +00:00
0d77dfc415 Update the copyright holders list in puzzles.but.
Asher Gordon points out that when Michael Quevillon was added to the
LICENCE file in commit 8af0c2961, he didn't also make it in to the
copy of the same list in puzzles.but.
2019-12-28 09:07:17 +00:00
12cb1adc88 Galaxies: clarify wording of completion condition.
A user mailed me today having found it less than clear from the docs
that Galaxies will only accept a solution if the set of filled-in grid
edges consists of _exactly_ the ones that separate two distinct
regions, rather than consisting of _at least_ those and perhaps others
which neither break rotational symmetry or disconnect any region.
2018-04-17 18:30:48 +01:00
7bdfda8409 Switch to using Halibut's new direct .CHM generation.
This allows me to remove HTML Help Workshop completely from my build
dependencies, and good riddance!
2017-05-13 20:20:23 +01:00
cce13ed712 Switch chiark URLs to https. 2017-05-07 16:25:56 +01:00
5123b1bf68 Clarify the Black Box rules slightly.
Chris Boyle points out that two of the rules are implicitly intended
to be read as only applying if a previous rule hadn't already decided
what would happen, and suggested that since not all readers infer that
priority order, it would be better to explicitly make them mutually
exclusive so that there can be no confusion about which one applies.
2016-10-30 20:43:11 +00:00
7195ed8882 Update documentation links.
Where possible (mostly with the Nikoli links), they've been updated to their
modern locations.  At least one link had to become a Wayback Machine link;
I didn't bother making the floodit.appspot.com link a Wayback one because
there's no content there without the backing of Google App Engine.  There
are other implementations online nowadays, of course, but I didn't want to
change the meaning of the text if at all possible.  In addition, I added
Flash warnings for the Nikoli pages that now use Flash for instructions.
2016-02-14 08:47:23 +00:00
1d9d6cbf12 Rename the docs section for Rectangles.
The web page currently assumes it's called 'rect' rather than
'rectangles', because the web-page building script uses the first
field of each line of gamedesc.txt, same as the Unix binary name.
Rather than add another confusingly-almost-identical field to that
file, it's easier to just rename this one docs section to make the
assumption of equality hold.
2016-01-07 19:35:32 +00:00
fa64ed3e87 Fix a typo in the Black Box docs examples.
A letter offset by one from a ball on the edge should be an R, not an
H. Thanks to Kevin Buzzard for pointing out the error.
2016-01-07 19:35:32 +00:00
3234912f92 Tents: mark squares as non-tents with {Shift,Control}-cursor keys. 2015-10-21 22:34:12 +01:00
3448fe1b47 Use \q{} in place of literal quote marks in puzzles.but.
While checking over the Palisade docs for this sort of error, I
happened to notice that a few were already in the existing games'
documentation.
2015-10-18 17:53:28 +01:00
6860c65bb3 Add a new puzzle: Palisade. 2015-10-18 17:53:28 +01:00
f7eb186184 Expand keyboard input options in Bridges, for faster entry.
- Lay bridges (crosess) with Control-arrow (Shift-arrow)
- Jump (non-orthogonally) to nearby islands with number keys, a..f
- Mark islands as done with a single tap on the space bar
2015-10-18 11:03:16 +01:00
fcf573c672 Update Sixteen keyboard system for faster entry.
Pressing Ctrl-arrow or Shift-arrow on a tile now moves the row or
column under the tile. With Ctrl, the cursor moves as well so you can
keep making moves that affect the same tile; with Shift, the cursor
stays put so you can keep making moves that affect the same location.
2015-10-18 10:59:50 +01:00
ef5c017a5f Add hinting feature to Guess.
Pressing H now suggests the lexicographically first row consistent
with all previous feedback.

The previous function of the H key to toggle a hold marker on the
current peg is now performed by Space / CURSOR_SELECT2, which is more
in line with other puzzles anyway.
2015-10-14 21:21:27 +01:00
12fabc4add Add hinting feature to Fifteen (press 'h' for a hint).
This is really an incremental solver. It alternates between solving
rows and solving columns. Each row and column is solved one piece at
a time. Except for some temporary trickery with the last two pieces
in a row or column, once a piece is solved it is never moved again.

(On non-square grids it first solves some rows or some columns until
the unsolved part is a square, then starts alternating.)
2015-10-14 20:29:32 +01:00
21b8323b2f Dominosa: Highlight a number when pressed on the keyboard. 2015-10-03 18:16:01 +01:00
47bc27b0c2 Add 'Inshi No Heya' (multiplication only) variant to Keen. 2015-10-03 17:12:20 +01:00
b9dfef7a12 Recompute solutions in Inertia if the user strays from the path. 2015-10-03 17:12:20 +01:00
79fe68dc57 Towers: allow marking of clues as done with the keyboard 2015-10-03 17:12:20 +01:00
6179e8df56 Allow marking of clues as exhausted in Unequal. 2015-10-03 17:12:20 +01:00
ea8da331e3 Cancel dragging in Pearl by pressing Escape or Backspace. 2015-10-03 16:59:10 +01:00
bf8ff09a84 Change Pearl's cursor logic.
Keyboard dragging while holding Control now moves the cursor to the
target square. Shift-Control-arrowkey performs the previous behavior
of Control-arrowkey.
2015-10-03 16:59:04 +01:00
11a394f69b Add more keyboard controls to Slant. 2015-10-03 16:59:04 +01:00
e59f820383 Rectangles: cancel keyboard drag with Escape. 2015-10-03 16:59:04 +01:00
c469bd285c Filling: enable keyboard-driven cursor dragging mode. 2015-10-03 16:59:04 +01:00
d5f7c4f871 Range: add pencil marks to squares by Shift-cursor keys. 2015-10-03 16:58:50 +01:00
7478275c8b Pattern: color multiple squares with Ctrl- or Shift-cursor keys. 2015-10-03 16:58:24 +01:00
f306b9db55 Magnets: you can now mark clues as done 2015-06-10 21:58:59 +01:00
f0750894ff Undead: you can now mark clues as done 2015-05-26 22:04:35 +01:00
486d2c8a76 Towers: you can now mark clues done 2015-05-22 08:18:53 +01:00
362bf8d450 New puzzle from James Harvey: 'Tracks'. 2015-02-08 16:23:32 +00:00
201b32983b New puzzle: 'Flood'.
Based on a web game I saw a few years ago, and dashed off this weekend
after I thought of a way to write a good (though not quite optimal)
heuristic solver, here's a random little thing not quite in the same
line as the most usual kind of Puzzles fare: instead of making you
scratch your head to find any move to make at all, it's easy to find
solutions in principle, and the challenge comes from having to do so
within a move limit.
2015-01-12 19:51:19 +00:00
2ebbdbf2a5 Remove dependencies on Subversion.
I'm going through all my projects and reworking them to avoid
depending on the monotonic integer-valued source control revision
identifier provided by Subversion, so I can migrate everything to git
without my builds and versioning breaking.

Puzzles's version number is now of the form YYYYMMDD.vvvvvv, where
vvvvvv is some string of source control information (currently still
the SVN-style "rNNNNN", but free to change in future). The date
provides monotonicity between my official automated builds, and the
second component is the one I'll be most interested in when people
send bug reports.

[originally from svn r10263]
2014-09-24 10:33:21 +00:00
580f9059e3 Continue the tradition of only remembering to update the copyright year
every other year.

[originally from svn r10116]
2014-01-16 01:03:58 +00:00
e2b35b2fc4 Document 'Unique rows and columns' option in Unruly, plus formatting tweaks
elsewhere.

[originally from svn r10035]
2013-08-29 09:27:34 +00:00
383c15794a Patch from Rogier Goossens to speed up the Pattern solver.
do_recurse() now prunes early whenever it encounters a branch of the
search tree inconsistent with existing grid data (rather than the
previous naive approach of proceeding to enumerate all possibilities
anyway and then ruling them out one by one); do_recurse also tries to
split the row up into independent sections where possible; finally the
main solver loop (all three copies of which have now been factored out
into a new solve_puzzle function), instead of simply looping round and
round over all the rows and columns, heuristically looks at the ones
most changed since the last time deduction was attempted on them, on
the basis that that will probably yield the most information the
fastest.

[originally from svn r9828]
2013-04-12 16:28:55 +00:00
48f9d92f6f Clarify instructions for 'Range' -- I initially read the last point as
meaning the maximum white squares in any direction, rather than the total of
all directions.

[originally from svn r9771]
2013-03-10 13:56:12 +00:00
083aeafc5c A user points out that I could usefully clarify the Undead clue
semantics when a reflected sight-line crosses the same monster twice.

[originally from svn r9694]
2012-11-03 16:27:49 +00:00
fc9e6277bd New puzzle! 'Unruly', contributed by Lennard Sprong, is an
implementation of a puzzle usually called 'Tohu wa Vohu'.

[originally from svn r9680]
2012-10-07 10:18:33 +00:00
55748a60cb Minor tweaks to Undead docs.
[originally from svn r9656]
2012-09-09 11:50:05 +00:00
67ddba7a15 New puzzle! Contributed by Steffen Bauer, an implementation of
'Haunted Mirror Maze', a game involving placing ghosts, zombies and
vampires in a grid so that the right numbers of them are visible along
sight-lines reflected through multiple mirrors.

[originally from svn r9652]
2012-09-08 10:48:05 +00:00