15 Commits

Author SHA1 Message Date
2efc77d2fd Fix warnings generated by gcc 4.6.0 about variables set but not
thereafter read. Most of these changes are just removal of pointless
stuff or trivial reorganisations; one change is actually substantive,
and fixes a bug in Keen's clue selection (the variable 'bad' was
unreferenced not because I shouldn't have set it, but because I
_should_ have referenced it!).

[originally from svn r9164]
2011-05-04 18:22:14 +00:00
980880be1f Add a function to every game backend which indicates whether a game
state is in a solved position, and a midend function wrapping it.

(Or, at least, a situation in which further play is pointless. The
point is, given that game state, would it be a good idea for a front
end that does that sort of thing to proactively provide the option to
start a fresh game?)

[originally from svn r9140]
2011-04-02 16:19:12 +00:00
f1ad38971c Memory leak fixes from Jonas Koelker.
[originally from svn r9001]
2010-09-20 10:36:44 +00:00
33be388d41 Take out some lurking "nullgame" holdovers from unfinished puzzle
source files, in case they cause trouble. Spotted by Lee Dowling.

[originally from svn r8300]
2008-11-16 15:42:32 +00:00
fe1b91ac49 Since the lack of this has caused portability issues in the past:
add "-ansi -pedantic" to the main Unix makefile, and clean up a few
minor problems pointed out thereby.

[originally from svn r8175]
2008-09-13 18:25:19 +00:00
a7431c0b7c New infrastructure feature. Games are now permitted to be
_conditionally_ able to format the current puzzle as text to be sent
to the clipboard. For instance, if a game were to support playing on
a square grid and on other kinds of grid such as hexagonal, then it
might reasonably feel that only the former could be sensibly
rendered in ASCII art; so it can now arrange for the "Copy" menu
item to be greyed out depending on the game_params.

To do this I've introduced a new backend function
(can_format_as_text_now()), and renamed the existing static backend
field "can_format_as_text" to "can_format_as_text_ever". The latter
will cause compile errors for anyone maintaining a third-party front
end; if any such person is reading this, I apologise to them for the
inconvenience, but I did do it deliberately so that they'd know to
update their front end.

As yet, no checked-in game actually uses this feature; all current
games can still either copy always or copy never.

[originally from svn r8161]
2008-09-06 09:27:56 +00:00
d9c4a9b659 Optimiser placation.
[originally from svn r7625]
2007-06-29 09:45:44 +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
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
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
7fce4f57c2 Close-to-finished auto-generating implementation of Klotski.
[originally from svn r7547]
2007-05-07 14:49:05 +00:00