sgt/puzzles
14 years agoNew puzzle! Setting what might be a record for how long we've sat on
simon [Mon, 15 Feb 2010 21:09:09 +0000 (21:09 +0000)]
New puzzle! Setting what might be a record for how long we've sat on
a puzzle before it was ready to commit, here is 'Signpost': a clone
of janko.at's "Arrow Path", by James Harvey.

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

14 years agoPatch inspired by one from James H: remove spurious references to
simon [Tue, 19 Jan 2010 00:56:37 +0000 (00:56 +0000)]
Patch inspired by one from James H: remove spurious references to
$mw (it should only ever have been used in the Cygwin makefile), and
move the libraries to the end of the link line in the Unix makefile
for better portability.

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

14 years agoFix from James H: the shared code between drawing and printing
simon [Mon, 18 Jan 2010 21:23:27 +0000 (21:23 +0000)]
Fix from James H: the shared code between drawing and printing
should use state->adjacent rather than ds->adjacent, because the
latter won't be initialised in printing mode.

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

14 years agoFix from James H: in printing mode, the shared code between drawing
simon [Mon, 18 Jan 2010 21:23:26 +0000 (21:23 +0000)]
Fix from James H: in printing mode, the shared code between drawing
and printing must avoid referring to stuff in the game_drawstate,
since the game_drawstate isn't a real one.

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

14 years agoMemory leak fix from James H.
simon [Mon, 18 Jan 2010 21:23:25 +0000 (21:23 +0000)]
Memory leak fix from James H.

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

14 years agoPatch from James H to fix a bug in which ambiguous puzzles would
simon [Sun, 17 Jan 2010 01:05:55 +0000 (01:05 +0000)]
Patch from James H to fix a bug in which ambiguous puzzles would
occasionally be generated, e.g. by 8x8de#417341658689473 .

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

14 years agoTypo/formatting fixes for Magnets documentation.
jacob [Sat, 16 Jan 2010 13:03:36 +0000 (13:03 +0000)]
Typo/formatting fixes for Magnets documentation.

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

14 years agoHighlight the sides as well as the top of a tower when it's
simon [Sat, 16 Jan 2010 12:38:15 +0000 (12:38 +0000)]
Highlight the sides as well as the top of a tower when it's
selected. I think this is a more or less aesthetically neutral
change for the actual selection, but the selection code is reused to
draw the victory flash and that's greatly improved by not having the
tower sides remain unflashed.

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

14 years agoDon't use payload strings directly as the format for printf.
simon [Wed, 13 Jan 2010 19:25:57 +0000 (19:25 +0000)]
Don't use payload strings directly as the format for printf.

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

14 years agoPlacate optimiser.
simon [Wed, 13 Jan 2010 19:25:56 +0000 (19:25 +0000)]
Placate optimiser.

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

14 years agosvn:ignore update.
simon [Wed, 13 Jan 2010 19:19:37 +0000 (19:19 +0000)]
svn:ignore update.

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

14 years agoNew puzzle from James H: 'Magnets'.
simon [Wed, 13 Jan 2010 19:12:32 +0000 (19:12 +0000)]
New puzzle from James H: 'Magnets'.

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

14 years agoCouple of small changes to Singles from James H which missed my main
simon [Tue, 12 Jan 2010 23:32:23 +0000 (23:32 +0000)]
Couple of small changes to Singles from James H which missed my main
commit: tweak the grid generation a bit, and fix the use of the
Solve function on a grid containing errors.

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

14 years agoPatch from James H: make the Windows debugging output conditional on
simon [Tue, 12 Jan 2010 23:32:22 +0000 (23:32 +0000)]
Patch from James H: make the Windows debugging output conditional on
an enabling environment variable.

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

14 years agoAdd a couple more checks to the 3d collision detection, without
simon [Tue, 12 Jan 2010 18:34:06 +0000 (18:34 +0000)]
Add a couple more checks to the 3d collision detection, without
which a click miles above the invisible RH surface of a tower would
sometimes select that tower.

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

14 years agoCorrections to Singles documentation, plus index terms.
jacob [Mon, 11 Jan 2010 22:46:02 +0000 (22:46 +0000)]
Corrections to Singles documentation, plus index terms.

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

14 years agoMisspelled keyword.
simon [Mon, 11 Jan 2010 21:27:37 +0000 (21:27 +0000)]
Misspelled keyword.

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

14 years agosvn:ignore update.
simon [Mon, 11 Jan 2010 21:21:29 +0000 (21:21 +0000)]
svn:ignore update.

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

14 years agoNew puzzle from James Harvey: 'Singles', an implementation of
simon [Mon, 11 Jan 2010 21:21:07 +0000 (21:21 +0000)]
New puzzle from James Harvey: 'Singles', an implementation of
Hitori. One infrastructure change in the process: latin.c has
acquired a utility function to generate a latin rectangle rather
than a full square.

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

14 years agoRetire the YTRANS and YUNTRANS macros in latin.[ch]. They were
simon [Mon, 11 Jan 2010 20:32:55 +0000 (20:32 +0000)]
Retire the YTRANS and YUNTRANS macros in latin.[ch]. They were
introduced to mimic similar macros in solo.c, in case Solo ever
moved over to being based on the latin.c solver framework; but even
Solo has long since lost those macros, so latin.c has no need to
keep them.

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

14 years agoThe 3-D graphics in Towers need a corresponding change on the input
simon [Mon, 11 Jan 2010 18:41:29 +0000 (18:41 +0000)]
The 3-D graphics in Towers need a corresponding change on the input
side: instead of locating a mouse click in whichever base grid
square contained the click location, we should check to see if a
tower protrudes on to that location from a neighbouring square. That
way, a click should reliably activate the tower that was actually
drawn under the mouse pointer.

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

14 years agoOops! Remove evidence of blatant clone-and-hack from Keen. :-)
simon [Mon, 11 Jan 2010 18:41:28 +0000 (18:41 +0000)]
Oops! Remove evidence of blatant clone-and-hack from Keen. :-)

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

14 years agoOops. Uncomment the difficulty exceptions! (Also add another
simon [Sat, 9 Jan 2010 17:21:36 +0000 (17:21 +0000)]
Oops. Uncomment the difficulty exceptions! (Also add another
constraint in validate_params.)

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

14 years agoNew year, new puzzle.
jacob [Fri, 8 Jan 2010 12:25:44 +0000 (12:25 +0000)]
New year, new puzzle.

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

14 years agoFix formatting.
jacob [Thu, 7 Jan 2010 20:50:49 +0000 (20:50 +0000)]
Fix formatting.

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

14 years agoCrop the Towers icon more sensibly (i.e. at all).
simon [Thu, 7 Jan 2010 19:09:58 +0000 (19:09 +0000)]
Crop the Towers icon more sensibly (i.e. at all).

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

14 years agoUpdate svn:ignore.
simon [Thu, 7 Jan 2010 18:42:21 +0000 (18:42 +0000)]
Update svn:ignore.

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

14 years agoUpgrade the graphics in Towers to include a thematically appropriate
simon [Thu, 7 Jan 2010 18:42:01 +0000 (18:42 +0000)]
Upgrade the graphics in Towers to include a thematically appropriate
3D effect. (I only committed it without so that I could preserve a
record of how the code looked before I added it.) The 3D effect can
be disabled by setting TOWERS_2D in the environment, should anybody
seriously dislike it.

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

14 years agoNew puzzle, again using the revised latin.c: 'Towers', a clone of a
simon [Thu, 7 Jan 2010 18:42:00 +0000 (18:42 +0000)]
New puzzle, again using the revised latin.c: 'Towers', a clone of a
latin-square puzzle which I've seen described by several names but
the most common is 'Skyscrapers'.

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

14 years agoMemory leak fix from James H.
simon [Thu, 7 Jan 2010 18:15:09 +0000 (18:15 +0000)]
Memory leak fix from James H.

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

14 years agoProof that check_errors() is sufficient.
simon [Tue, 5 Jan 2010 23:40:42 +0000 (23:40 +0000)]
Proof that check_errors() is sufficient.

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

14 years agoRefer to group elements by letters instead of numbers, in keeping
simon [Tue, 5 Jan 2010 23:40:41 +0000 (23:40 +0000)]
Refer to group elements by letters instead of numbers, in keeping
with usual abstract group notation. In puzzles with a clear
identity, it's called e.

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

14 years agoAdd a facility in the latin.c solver diagnostics to allow a puzzle
simon [Tue, 5 Jan 2010 23:40:40 +0000 (23:40 +0000)]
Add a facility in the latin.c solver diagnostics to allow a puzzle
to call the digit values by custom names.

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

14 years agoAdd an even more evil (!) game mode, in which it's not made
simon [Tue, 5 Jan 2010 19:52:52 +0000 (19:52 +0000)]
Add an even more evil (!) game mode, in which it's not made
immediately obvious which element of the group is the identity - at
least two elements including the identity have their rows and
columns completely blanked.

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

14 years agoYikes! Fix a misaimed 'sizeof' which I only got away with because
simon [Tue, 5 Jan 2010 18:51:42 +0000 (18:51 +0000)]
Yikes! Fix a misaimed 'sizeof' which I only got away with because
ints and pointers are usually the same size.

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

14 years agoA user asked for the < signs in Unequal to be bolder.
simon [Tue, 5 Jan 2010 18:26:55 +0000 (18:26 +0000)]
A user asked for the < signs in Unequal to be bolder.

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

14 years agoMissing piece of code I should have cribbed from Solo: we have to
simon [Tue, 5 Jan 2010 18:26:44 +0000 (18:26 +0000)]
Missing piece of code I should have cribbed from Solo: we have to
lay out large numbers of pencil marks differently in a square
containing a clue.

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

14 years agoAnother 16-bit-cleanliness fix (and for once I spotted it before James!)
simon [Tue, 5 Jan 2010 18:26:42 +0000 (18:26 +0000)]
Another 16-bit-cleanliness fix (and for once I spotted it before James!)

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

14 years agoMemory leak fix from Tiago Dionizio: whenever we free the midend's
simon [Mon, 4 Jan 2010 19:14:35 +0000 (19:14 +0000)]
Memory leak fix from Tiago Dionizio: whenever we free the midend's
collection of game states, we should also free the move strings from
which they were constructed.

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

14 years ago16-bit cleanliness patch from James H.
simon [Mon, 4 Jan 2010 18:55:56 +0000 (18:55 +0000)]
16-bit cleanliness patch from James H.

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

14 years agoFor my own use in local Windows builds of the 'unfinished' puzzles,
simon [Fri, 1 Jan 2010 20:06:34 +0000 (20:06 +0000)]
For my own use in local Windows builds of the 'unfinished' puzzles,
add an include directory to the Windows makefile so that source
files in subdirectories can find the main headers.

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

14 years agoCouple of missing 'static's.
simon [Fri, 1 Jan 2010 19:41:59 +0000 (19:41 +0000)]
Couple of missing 'static's.

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

14 years agoNew puzzle in 'unfinished'. Essentially, Sudoku for group theorists:
simon [Wed, 30 Dec 2009 16:53:36 +0000 (16:53 +0000)]
New puzzle in 'unfinished'. Essentially, Sudoku for group theorists:
you are given a partially specified Cayley table of a small finite
group, and must fill in all the missing entries using both Sudoku-
style deductions (minus the square block constraint) and the group
axioms. I've just thrown it together in about five hours by cloning-
and-hacking from Keen, as much as anything else to demonstrate that
the new latin.c interface really does make it extremely easy to
write new Latin square puzzles.

It's not really _unfinished_, as such, but it is just too esoteric
(not to mention difficult) for me to feel entirely comfortable with
adding it to the main puzzle collection. I can't bring myself to
throw it away, though, and who knows - perhaps a university maths
department might find it a useful teaching tool :-)

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

14 years agoFix bug causing array overrun. Only seemed to be showing a symptom
simon [Sun, 27 Dec 2009 19:18:22 +0000 (19:18 +0000)]
Fix bug causing array overrun. Only seemed to be showing a symptom
on Windows, presumably because the data after the array was harmless
elsewhere.

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

14 years agoAdd keen and keensolver to svn:ignore.
simon [Sun, 27 Dec 2009 10:03:13 +0000 (10:03 +0000)]
Add keen and keensolver to svn:ignore.

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

14 years agoNew puzzle! 'Keen', a clone of KenKen.
simon [Sun, 27 Dec 2009 10:01:23 +0000 (10:01 +0000)]
New puzzle! 'Keen', a clone of KenKen.

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

14 years agoNormalise Unequal (and latin.c) so that solver diagnostics start
simon [Sun, 27 Dec 2009 10:01:20 +0000 (10:01 +0000)]
Normalise Unequal (and latin.c) so that solver diagnostics start
their coordinate from 1 rather than 0, for consistency with Solo.
(My geek instincts would rather work from 0, but I've generally
found that puzzle users sending me email tend to prefer 1.)

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

14 years agoI've never trusted common variables. Take those bare ints out of
simon [Sun, 27 Dec 2009 10:01:18 +0000 (10:01 +0000)]
I've never trusted common variables. Take those bare ints out of
latin.h and put them in latin.c with 'extern' declarations in the
header.

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

14 years agoIntroduce, and implement as usefully as I can in all front ends, a
simon [Sun, 27 Dec 2009 10:01:16 +0000 (10:01 +0000)]
Introduce, and implement as usefully as I can in all front ends, a
new function in the drawing API which permits the display of text
from outside basic ASCII. A fallback mechanism is provided so that
puzzles can give a list of strings they'd like to display in order
of preference and the system will return the best one it can manage;
puzzles are required to cope with ASCII-only front ends.

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

14 years agoTweak the semantics of dsf_merge() so that the canonical element of
simon [Sun, 27 Dec 2009 10:01:11 +0000 (10:01 +0000)]
Tweak the semantics of dsf_merge() so that the canonical element of
any equivalence class is always the element with the smallest index.
This is slower (the previous behaviour, suggested by Jonas Koelker,
was to choose the new root element to maximise performance), but
still more than acceptably fast and more useful.

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

14 years agoRefactor latin.c to make it easier to reuse. Instead of client
simon [Sun, 27 Dec 2009 10:01:10 +0000 (10:01 +0000)]
Refactor latin.c to make it easier to reuse. Instead of client
programs having to clone the latin_solver() function and insert
their own extra deduction routines, they can now just _call_
latin_solver with enough parameters to let it fit its own deductions
into their difficulty framework and call a set of provided function
pointers to do user deductions. Modified Unequal to work in the new
world, of course.

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

14 years agoNew mode for Unequal, from James H. In this mode, called 'Adjacent',
simon [Sun, 27 Dec 2009 10:01:09 +0000 (10:01 +0000)]
New mode for Unequal, from James H. In this mode, called 'Adjacent',
the < and > clues are replaced by bars separating every pair of
squares whose contents differ by exactly 1. Unlike standard Unequal,
which presents only a subset of the available clues, in Adjacent the
clues are _all_ present, so you can deduce from the absence of a bar
that the two numbers it would separate are _not_ consecutive.

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

14 years agolatin_generate_quick is long gone, so remove it from the header file.
simon [Wed, 23 Dec 2009 11:34:25 +0000 (11:34 +0000)]
latin_generate_quick is long gone, so remove it from the header file.

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

14 years agoKeyboard control for Dominosa (patch largely due to James H, though
simon [Tue, 22 Dec 2009 16:47:42 +0000 (16:47 +0000)]
Keyboard control for Dominosa (patch largely due to James H, though
with considerable meddling from me).

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

14 years agoJonas Koelker points out that the backspace key didn't work in GTK
simon [Sun, 20 Dec 2009 10:01:57 +0000 (10:01 +0000)]
Jonas Koelker points out that the backspace key didn't work in GTK
Guess, because Guess expected ^H whereas GTK generated ^?. Other
puzzles that use Backspace do it by being prepared to see either,
which seems wasteful. Now the midend normalises both into ^H, so
front ends can generate whichever they like while puzzles can
safely just look for ^H.

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

14 years agoMinor bug fixes from James Harvey.
simon [Thu, 17 Dec 2009 18:20:32 +0000 (18:20 +0000)]
Minor bug fixes from James Harvey.

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

14 years agoPatches from Frode Austvik to modify the effects of the mouse
simon [Thu, 17 Dec 2009 18:16:42 +0000 (18:16 +0000)]
Patches from Frode Austvik to modify the effects of the mouse
buttons in several games if STYLUS_BASED is defined: in games where
you can set a puzzle element to 'on', 'off' or 'not yet set', when
it's hard to mimic a second mouse button, it's better to have the
one 'button' cycle between all three states rather than from 'on'
back to 'unset'.

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

14 years agoPatch from Frode Austvik to tinker with the GTK interface if
simon [Thu, 17 Dec 2009 18:12:18 +0000 (18:12 +0000)]
Patch from Frode Austvik to tinker with the GTK interface if
compiling gtk.c with STYLUS_BASED defined: most notably, it provides
a row of numeric 'keys' made of GTK button widgets for puzzles that
want a numeric keypad.

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

14 years agoPatch from Frode Austvik to permit passing CFLAGS in to the Unix
simon [Thu, 17 Dec 2009 17:55:42 +0000 (17:55 +0000)]
Patch from Frode Austvik to permit passing CFLAGS in to the Unix
makefile.

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

14 years agoAnother wording tweak from Helge Kreutzmann.
jacob [Sun, 13 Dec 2009 12:47:10 +0000 (12:47 +0000)]
Another wording tweak from Helge Kreutzmann.

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

14 years agoFix for the grid generation in the presence of particularly strange
simon [Mon, 16 Nov 2009 21:21:00 +0000 (21:21 +0000)]
Fix for the grid generation in the presence of particularly strange
grid types.

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

14 years agoAdd a precautionary pair of initialisations to placate optimisers,
simon [Tue, 10 Nov 2009 19:11:03 +0000 (19:11 +0000)]
Add a precautionary pair of initialisations to placate optimisers,
and asserts to check that the preinitialised values are never
actually used.

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

14 years agoRemove ASCII-art arrows. Missing \dash (Debian bug #522439).
jacob [Thu, 5 Nov 2009 14:09:04 +0000 (14:09 +0000)]
Remove ASCII-art arrows. Missing \dash (Debian bug #522439).

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

14 years agoBeat up on Black Box docs, after Debian bug #548472.
jacob [Wed, 4 Nov 2009 13:19:39 +0000 (13:19 +0000)]
Beat up on Black Box docs, after Debian bug #548472.

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

14 years agoTypo fixes from Debian bug#554341.
jacob [Wed, 4 Nov 2009 12:06:32 +0000 (12:06 +0000)]
Typo fixes from Debian bug#554341.

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

14 years agoSingle mouse clicks to toggle individual grid edges stopped working
simon [Tue, 13 Oct 2009 17:09:42 +0000 (17:09 +0000)]
Single mouse clicks to toggle individual grid edges stopped working
in r8414 as a side effect of reorganisation in interpret_move().
Reinstate them.

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

14 years agoAdd a couple of missing checks in validate_desc(), without which
simon [Wed, 16 Sep 2009 12:57:07 +0000 (12:57 +0000)]
Add a couple of missing checks in validate_desc(), without which
bogus game IDs were getting as far as new_game() and failing
assertions.

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

14 years agoMinor rewording and typo-correction.
simon [Wed, 16 Sep 2009 11:06:02 +0000 (11:06 +0000)]
Minor rewording and typo-correction.

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

14 years agoAha, I've managed to prove that my inadequate error highlighting is
simon [Wed, 16 Sep 2009 10:57:11 +0000 (10:57 +0000)]
Aha, I've managed to prove that my inadequate error highlighting is
actually just about adequate after all. Large comment added
containing some discussion and the proof.

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

14 years agoError-highlighted trees look nicer with a different-coloured trunk.
simon [Sun, 13 Sep 2009 14:43:21 +0000 (14:43 +0000)]
Error-highlighted trees look nicer with a different-coloured trunk.
Also added a comment worrying about the universality of my error
highlighting mechanism.

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

14 years agoRedo Mines and Inertia's mine graphics using an actual circle rather
simon [Sun, 13 Sep 2009 13:08:34 +0000 (13:08 +0000)]
Redo Mines and Inertia's mine graphics using an actual circle rather
than an approximating octagon, to improve the look when zoomed to
high resolution.

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

14 years agoTweak to the promptness of error highlighting display.
simon [Sat, 12 Sep 2009 12:54:49 +0000 (12:54 +0000)]
Tweak to the promptness of error highlighting display.

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

14 years agoAbout time I got round to this: error highlighting for Tents.
simon [Sat, 12 Sep 2009 12:30:43 +0000 (12:30 +0000)]
About time I got round to this: error highlighting for Tents.

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

14 years agoFix width/height braino introduced in r5844.
simon [Wed, 9 Sep 2009 18:22:14 +0000 (18:22 +0000)]
Fix width/height braino introduced in r5844.

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

14 years agoAdd execute permission to the .exe files inside the zip file.
simon [Fri, 28 Aug 2009 17:43:44 +0000 (17:43 +0000)]
Add execute permission to the .exe files inside the zip file.

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

14 years agoMore defensive-coding fixes from James H.
simon [Wed, 1 Jul 2009 22:01:21 +0000 (22:01 +0000)]
More defensive-coding fixes from James H.

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

14 years agoPatch from Mark Wooding: when I did r7980 I had completely failed to
simon [Sun, 21 Jun 2009 13:49:09 +0000 (13:49 +0000)]
Patch from Mark Wooding: when I did r7980 I had completely failed to
notice that there was an _official_ way to have menu items marked as
selected or unselected, which is the GtkRadioMenuItem class. Replace
my ad-hoc use of bullet characters with that.

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

14 years agoPatch from Mark Wooding: use gdk_event_request_motions() where
simon [Sun, 21 Jun 2009 13:39:54 +0000 (13:39 +0000)]
Patch from Mark Wooding: use gdk_event_request_motions() where
available, which magically seems to eliminate most if not all of the
update lag when dragging a point in a large (say 250-point)
Untangle. I don't fully understand how this works, but it seems to!

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

14 years agoPatch from Mark Wooding: stop setting GTK_EXPAND for the x-direction
simon [Sun, 21 Jun 2009 13:34:50 +0000 (13:34 +0000)]
Patch from Mark Wooding: stop setting GTK_EXPAND for the x-direction
on labels in tables. The effect is that if you resize (e.g.) Solo's
configuration panel, the labels to the left of the various input
boxes will remain just big enough to fit their text in, and all the
extra space will be taken up by the useful part, i.e. the input
boxes themselves. Previously the labels and input boxes would expand
in a 1:1 ratio, causing lots of space to the right of the label text
that wasn't used for anything.

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

14 years agoPatch from Mark Wooding: one-pixel fix to the alignment of the
simon [Sun, 21 Jun 2009 13:28:43 +0000 (13:28 +0000)]
Patch from Mark Wooding: one-pixel fix to the alignment of the
bottom and right edges of the Tents keyboard cursor.

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

14 years agoPatch from Mark Wooding (though somewhat tampered with by me): have
simon [Sun, 21 Jun 2009 13:24:48 +0000 (13:24 +0000)]
Patch from Mark Wooding (though somewhat tampered with by me): have
Loopy mark LINE_NO grid edges with very faint lines, instead of
leaving them totally undrawn. Helps in complex grid types where the
line layout isn't entirely obvious to a player not already familiar
with it. Disableable by setting LOOPY_FAINT_LINES=n in the
environment, just in case anyone turns out to seriously dislike it.
(You could probably disable it via LOOPY_COLOUR_6 too, but you'd
have to know the exact shade of your background to get that right.)

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

14 years agoMemory management and other fixes from James H.
simon [Wed, 17 Jun 2009 20:01:45 +0000 (20:01 +0000)]
Memory management and other fixes from James H.

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

15 years agoFix a misdesign I must have missed when I reviewed the Killer patch:
simon [Thu, 30 Apr 2009 17:56:56 +0000 (17:56 +0000)]
Fix a misdesign I must have missed when I reviewed the Killer patch:
merge_some_cages() was written in the assumption that it would
always be able to do something, in that it returned void on success
and if it couldn't find anything to do it would just loop round
forever trying the same things over and over again.

Now it makes a methodical list of the pairs of cages which are merge
candidates, goes through them in a random order until it finds a
viable one, and returns a boolean indicating whether it succeeded or
ran out of candidates.

A test case which previously hung and now does not is "solo
--generate 1 7jxkdt#12345-10".

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

15 years agocheck_valid() wasn't checking that Killer cages contain at most one
simon [Wed, 29 Apr 2009 23:11:10 +0000 (23:11 +0000)]
check_valid() wasn't checking that Killer cages contain at most one
of each digit, and - perhaps more importantly - the display code
wasn't highlighting violations of that rule as an error. Fix both.

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

15 years agoIt's been a new year for some time now.
jacob [Thu, 19 Mar 2009 23:32:30 +0000 (23:32 +0000)]
It's been a new year for some time now.

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

15 years agoPatch from James H to provide 16-bit-int cleanliness in Killer Solo.
simon [Mon, 2 Mar 2009 23:32:43 +0000 (23:32 +0000)]
Patch from James H to provide 16-bit-int cleanliness in Killer Solo.

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

15 years agoPatch from James H to abstract out of Dominosa the code which
simon [Mon, 2 Mar 2009 19:45:59 +0000 (19:45 +0000)]
Patch from James H to abstract out of Dominosa the code which
randomly generates a tiling of a rectangle with dominoes, since he
wants to reuse that function in another puzzle.

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

15 years agoMake menus accessible from the keyboard in the Gtk front-end.
jacob [Sun, 1 Mar 2009 13:51:32 +0000 (13:51 +0000)]
Make menus accessible from the keyboard in the Gtk front-end.

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

15 years agoFix cosmetic glitch in the interaction between Killer and Jigsaw
simon [Tue, 24 Feb 2009 07:49:01 +0000 (07:49 +0000)]
Fix cosmetic glitch in the interaction between Killer and Jigsaw
modes.

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

15 years agoMake icon building cope with Solo's increased default tilesize as of r8455.
jacob [Mon, 23 Feb 2009 17:42:50 +0000 (17:42 +0000)]
Make icon building cope with Solo's increased default tilesize as of r8455.

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

15 years agoFix duplicate keyword.
jacob [Sun, 22 Feb 2009 12:57:20 +0000 (12:57 +0000)]
Fix duplicate keyword.

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

15 years agoA substantial patch to Solo from Bernd Schmidt, adding support for
simon [Sun, 22 Feb 2009 12:16:54 +0000 (12:16 +0000)]
A substantial patch to Solo from Bernd Schmidt, adding support for
the 'Killer Sudoku' puzzle type. As a side effect I've had to
increase the default tile size of Solo, so that the extra numbers
drawn in the squares in Killer mode were still legible.

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

15 years agoIntroduce some infrastructure to permit games' print functions to
simon [Sun, 22 Feb 2009 12:05:38 +0000 (12:05 +0000)]
Introduce some infrastructure to permit games' print functions to
draw dotted lines. No puzzle yet uses this, but one's about to.

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

15 years agoFix the Java front end's vertical text positioning when
simon [Sun, 22 Feb 2009 12:02:40 +0000 (12:02 +0000)]
Fix the Java front end's vertical text positioning when
ALIGN_VNORMAL is in use: ALIGN_VNORMAL indicates that the supplied
y-coordinate denotes the _baseline_ of the text, not its top, so
adding on 'asc' to convert to the baseline is wrong.

This only affects Tents, at present.

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

15 years agoKeyboard control patch for Bridges, from James H.
simon [Thu, 5 Feb 2009 19:29:26 +0000 (19:29 +0000)]
Keyboard control patch for Bridges, from James H.

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

15 years agoLee Dowling points out that duplicating the entire grid data
simon [Thu, 5 Feb 2009 19:25:44 +0000 (19:25 +0000)]
Lee Dowling points out that duplicating the entire grid data
structure in every game_state is terribly wasteful. Move all the
constant bits of it (i.e. everything except the per-square 'blue'
flag) into a ref-counted shared structure.

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

15 years agoKeyboard control patch for Black Box, from James H.
simon [Wed, 28 Jan 2009 18:28:41 +0000 (18:28 +0000)]
Keyboard control patch for Black Box, from James H.

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

15 years agoKeyboard control patch for Twiddle, from James H.
simon [Wed, 28 Jan 2009 18:27:10 +0000 (18:27 +0000)]
Keyboard control patch for Twiddle, from James H.

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

15 years agoKeyboard control patch for Pattern, from James H.
simon [Tue, 27 Jan 2009 18:30:46 +0000 (18:30 +0000)]
Keyboard control patch for Pattern, from James H.

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

15 years agoKeyboard control for Map, from James H.
simon [Tue, 27 Jan 2009 18:26:10 +0000 (18:26 +0000)]
Keyboard control for Map, from James H.

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