1011 Commits

Author SHA1 Message Date
b39f9dfb99 Docs and comments fixes from James H.
[originally from svn r8866]
2010-02-16 10:48:25 +00:00
1fa6d1b7f1 Updates to the new-puzzle checklist, since the world has moved on.
[originally from svn r8865]
2010-02-15 21:31:58 +00:00
7e4f870f6d 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.

[originally from svn r8861]
2010-02-15 21:09:09 +00:00
b0ad387d05 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.

[originally from svn r8853]
2010-01-19 00:56:37 +00:00
f55dc67f43 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.

[originally from svn r8852]
2010-01-18 21:23:27 +00:00
9f96c12e9f 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.

[originally from svn r8851]
2010-01-18 21:23:26 +00:00
3c6280ef8b Memory leak fix from James H.
[originally from svn r8850]
2010-01-18 21:23:25 +00:00
6b650f894c Patch from James H to fix a bug in which ambiguous puzzles would
occasionally be generated, e.g. by 8x8de#417341658689473 .

[originally from svn r8845]
2010-01-17 01:05:55 +00:00
6d5493300f Typo/formatting fixes for Magnets documentation.
[originally from svn r8844]
2010-01-16 13:03:36 +00:00
4a9961a572 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.

[originally from svn r8843]
2010-01-16 12:38:15 +00:00
854f4b2386 Don't use payload strings directly as the format for printf.
[originally from svn r8839]
2010-01-13 19:25:57 +00:00
65b37d5dd5 Placate optimiser.
[originally from svn r8838]
2010-01-13 19:25:56 +00:00
0d0619868d New puzzle from James H: 'Magnets'.
[originally from svn r8836]
2010-01-13 19:12:32 +00:00
deb5e1e5b4 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.

[originally from svn r8835]
2010-01-12 23:32:23 +00:00
b3af872f3c Patch from James H: make the Windows debugging output conditional on
an enabling environment variable.

[originally from svn r8834]
2010-01-12 23:32:22 +00:00
7aefa1110a 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.

[originally from svn r8833]
2010-01-12 18:34:06 +00:00
f3d39a0abb Corrections to Singles documentation, plus index terms.
[originally from svn r8832]
2010-01-11 22:46:02 +00:00
af0bfd07d3 Misspelled keyword.
[originally from svn r8830]
2010-01-11 21:27:37 +00:00
58e0d0bc2d 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.

[originally from svn r8828]
2010-01-11 21:21:07 +00:00
771f5446a8 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.

[originally from svn r8827]
2010-01-11 20:32:55 +00:00
056465cb03 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.

[originally from svn r8826]
2010-01-11 18:41:29 +00:00
67d55dc5f4 Oops! Remove evidence of blatant clone-and-hack from Keen. :-)
[originally from svn r8825]
2010-01-11 18:41:28 +00:00
6776b0afba Oops. Uncomment the difficulty exceptions! (Also add another
constraint in validate_params.)

[originally from svn r8824]
2010-01-09 17:21:36 +00:00
572a746937 New year, new puzzle.
[originally from svn r8823]
2010-01-08 12:25:44 +00:00
28cb7e1e6c Fix formatting.
[originally from svn r8822]
2010-01-07 20:50:49 +00:00
88b66e1257 Crop the Towers icon more sensibly (i.e. at all).
[originally from svn r8821]
2010-01-07 19:09:58 +00:00
7cd075870e 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.

[originally from svn r8817]
2010-01-07 18:42:01 +00:00
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