834 Commits

Author SHA1 Message Date
ceb12cb080 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'.

[originally from svn r8816]
2010-01-07 18:42:00 +00:00
7c3413a2f2 Memory leak fix from James H.
[originally from svn r8815]
2010-01-07 18:15:09 +00:00
2500531423 Proof that check_errors() is sufficient.
[originally from svn r8813]
2010-01-05 23:40:42 +00:00
dd4c8ceb1f 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.

[originally from svn r8812]
2010-01-05 23:40:41 +00:00
13d7ff6ae5 Add a facility in the latin.c solver diagnostics to allow a puzzle
to call the digit values by custom names.

[originally from svn r8811]
2010-01-05 23:40:40 +00:00
a7b220ff9a 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.

[originally from svn r8810]
2010-01-05 19:52:52 +00:00
66a6a930c5 Yikes! Fix a misaimed 'sizeof' which I only got away with because
ints and pointers are usually the same size.

[originally from svn r8809]
2010-01-05 18:51:42 +00:00
ed4b163b69 A user asked for the < signs in Unequal to be bolder.
[originally from svn r8808]
2010-01-05 18:26:55 +00:00
81c65eeac1 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.

[originally from svn r8807]
2010-01-05 18:26:44 +00:00
c3c186d687 Another 16-bit-cleanliness fix (and for once I spotted it before James!)
[originally from svn r8806]
2010-01-05 18:26:42 +00:00
4dfd8512ab 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.

[originally from svn r8805]
2010-01-04 19:14:35 +00:00
56b421a632 16-bit cleanliness patch from James H.
[originally from svn r8803]
2010-01-04 18:55:56 +00:00
441cbbb2e0 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.

[originally from svn r8802]
2010-01-01 20:06:34 +00:00
79bb9c00b3 Couple of missing 'static's.
[originally from svn r8801]
2010-01-01 19:41:59 +00:00
c91471e6c1 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 :-)

[originally from svn r8800]
2009-12-30 16:53:36 +00:00
b629e34beb Fix bug causing array overrun. Only seemed to be showing a symptom
on Windows, presumably because the data after the array was harmless
elsewhere.

[originally from svn r8798]
2009-12-27 19:18:22 +00:00
514bd502be New puzzle! 'Keen', a clone of KenKen.
[originally from svn r8796]
2009-12-27 10:01:23 +00:00
a79ab34941 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.)

[originally from svn r8795]
2009-12-27 10:01:20 +00:00
3c3368d07f 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.

[originally from svn r8794]
2009-12-27 10:01:18 +00:00
9fbb365684 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.

[originally from svn r8793]
2009-12-27 10:01:16 +00:00
72922b3078 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.

[originally from svn r8792]
2009-12-27 10:01:11 +00:00
189f833980 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.

[originally from svn r8791]
2009-12-27 10:01:10 +00:00
b9c22e5cac 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.

[originally from svn r8790]
2009-12-27 10:01:09 +00:00
d54b4c4651 latin_generate_quick is long gone, so remove it from the header file.
[originally from svn r8789]
2009-12-23 11:34:25 +00:00
2b06c12728 Keyboard control for Dominosa (patch largely due to James H, though
with considerable meddling from me).

[originally from svn r8788]
2009-12-22 16:47:42 +00:00
2bdabe31cf 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.

[originally from svn r8786]
2009-12-20 10:01:57 +00:00
8628a0630c Minor bug fixes from James Harvey.
[originally from svn r8785]
2009-12-17 18:20:32 +00:00
97477f0916 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'.

[originally from svn r8784]
2009-12-17 18:16:42 +00:00
6d5245d8bf 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.

[originally from svn r8783]
2009-12-17 18:12:18 +00:00
84d48aa074 Patch from Frode Austvik to permit passing CFLAGS in to the Unix
makefile.

[originally from svn r8782]
2009-12-17 17:55:42 +00:00
525370a569 Another wording tweak from Helge Kreutzmann.
[originally from svn r8780]
2009-12-13 12:47:10 +00:00
2ac017b62c Fix for the grid generation in the presence of particularly strange
grid types.

[originally from svn r8750]
2009-11-16 21:21:00 +00:00
9c95ea2619 Add a precautionary pair of initialisations to placate optimisers,
and asserts to check that the preinitialised values are never
actually used.

[originally from svn r8745]
2009-11-10 19:11:03 +00:00
ddbe9abe8a Remove ASCII-art arrows. Missing \dash (Debian bug #522439).
[originally from svn r8736]
2009-11-05 14:09:04 +00:00
92bd8da9c4 Beat up on Black Box docs, after Debian bug #548472.
[originally from svn r8735]
2009-11-04 13:19:39 +00:00
730462ab13 Typo fixes from Debian bug#554341.
[originally from svn r8734]
2009-11-04 12:06:32 +00:00
236889f6d6 Single mouse clicks to toggle individual grid edges stopped working
in r8414 as a side effect of reorganisation in interpret_move().
Reinstate them.

[originally from svn r8692]
[r8414 == 54801998744a69786a49ebe0688942ae7b57525b]
2009-10-13 17:09:42 +00:00
4f6e48e6be Add a couple of missing checks in validate_desc(), without which
bogus game IDs were getting as far as new_game() and failing
assertions.

[originally from svn r8655]
2009-09-16 12:57:07 +00:00
466c398a00 Minor rewording and typo-correction.
[originally from svn r8654]
2009-09-16 11:06:02 +00:00
ddfa693b0f 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.

[originally from svn r8653]
2009-09-16 10:57:11 +00:00
84d012998f Error-highlighted trees look nicer with a different-coloured trunk.
Also added a comment worrying about the universality of my error
highlighting mechanism.

[originally from svn r8647]
2009-09-13 14:43:21 +00:00
dfb8fa2e92 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.

[originally from svn r8646]
2009-09-13 13:08:34 +00:00
e2522c2897 Tweak to the promptness of error highlighting display.
[originally from svn r8645]
2009-09-12 12:54:49 +00:00
1b927c77b7 About time I got round to this: error highlighting for Tents.
[originally from svn r8644]
2009-09-12 12:30:43 +00:00
503f6650e9 Fix width/height braino introduced in r5844.
[originally from svn r8643]
[r5844 == 865e8ad6ca3d83ad2a585ceeb1809e9f68c18a20]
2009-09-09 18:22:14 +00:00
e794621861 Add execute permission to the .exe files inside the zip file.
[originally from svn r8634]
2009-08-28 17:43:44 +00:00
cfdba00313 More defensive-coding fixes from James H.
[originally from svn r8605]
2009-07-01 22:01:21 +00:00
652f03a8ae 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.

[originally from svn r8601]
[r7980 == ae6c7381272f84c0fd398f6d3e496f571ba42ec8]
2009-06-21 13:49:09 +00:00
93cd7ae62c 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!

[originally from svn r8600]
2009-06-21 13:39:54 +00:00
ec29642539 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.

[originally from svn r8599]
2009-06-21 13:34:50 +00:00