aboutsummaryrefslogtreecommitdiff
path: root/keen.c (follow)
Commit message (Collapse)AuthorAge
* New rule: interpret_move() is passed a pointer to the game_drawstateSimon Tatham2012-09-09
| | | | | | | | | | | | | | | | basically just so that it can divide mouse coordinates by the tile size, but is definitely not expected to _write_ to it, and it hadn't previously occurred to me that anyone might try. Therefore, interpret_move() now gets a pointer to a _const_ game_drawstate instead of a writable one. All existing puzzles cope fine with this API change (as long as the new const qualifier is also added to a couple of subfunctions to which interpret_move delegates work), except for the just-committed Undead, which somehow had ds->ascii and ui->ascii the wrong way round but is otherwise unproblematic. [originally from svn r9657]
* Changed my mind about midend_is_solved: I've now reprototyped it asSimon Tatham2011-06-19
| | | | | | | | | | | | | | | | midend_status(), and given it three return codes for win, (permanent) loss and game-still-in-play. Depending on what the front end wants to use it for, it may find any or all of these three states worth distinguishing from each other. (I suppose a further enhancement might be to add _non_-permanent loss as a fourth distinct status, to describe situations in which you can't play further without pressing Undo but doing so is not completely pointless. That might reasonably include dead-end situations in Same Game and Pegs, and blown-self-up situations in Mines and Inertia. However, I haven't done this at present.) [originally from svn r9179]
* Having played Keen a bit following the clue-generation fix in r9165,Simon Tatham2011-05-07
| | | | | | | | | | | | | | | | | I've decided that the extremely low density of one-option multiplication clues is not a universally good idea after all: it seems to me to make puzzles _quantitatively_ harder, even if Keen's difficulty-level system can't see any difference in the set of modes of reasoning required at least once to solve the grid. So I've readjusted the clue selection, so that multiplicative clues with only one workable pair of factors are restored to 'good' status at Normal difficulty level and below, and only considered less-than- fully-desirable at Hard and above. I think that's a reasonable compromise. [originally from svn r9170] [r9165 == e7b2a9dd8d8915802fb69ce2242b1f913b7f3172]
* Having looked at Keen's clue selection code, I also notice that theSimon Tatham2011-05-04
| | | | | | | | | | intended behaviour of classifying multiplication clues as low-quality if they only left one possible pair of multiplicands has never actually worked, because I should have compared the possible clue count against 2 rather than 1 since the multiplicands can occur either way round. [originally from svn r9165]
* Fix warnings generated by gcc 4.6.0 about variables set but notSimon Tatham2011-05-04
| | | | | | | | | | 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]
* Add a function to every game backend which indicates whether a gameSimon Tatham2011-04-02
| | | | | | | | | | | 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]
* Patch from Ben Hutchings to fix an error-checking goof: KeenSimon Tatham2010-05-16
| | | | | | | | | | | | division clues were failing to light up as erroneous if the quotient of the numbers in them came out right under rounded-down C integer division (e.g. 2 and 5 would be accepted for a 2/ clue). Apparently I copied the code that invents clues in the generator straight into the solution checker, without remembering that the generator was allowed to do it that way because exact divisibility had been checked elsewhere. [originally from svn r8951]
* Memory leak fix from James H.Simon Tatham2010-01-18
| | | | [originally from svn r8850]
* Missing piece of code I should have cribbed from Solo: we have toSimon Tatham2010-01-05
| | | | | | | lay out large numbers of pencil marks differently in a square containing a clue. [originally from svn r8807]
* Another 16-bit-cleanliness fix (and for once I spotted it before James!)Simon Tatham2010-01-05
| | | | [originally from svn r8806]
* 16-bit cleanliness patch from James H.Simon Tatham2010-01-04
| | | | [originally from svn r8803]
* Couple of missing 'static's.Simon Tatham2010-01-01
| | | | [originally from svn r8801]
* New puzzle! 'Keen', a clone of KenKen.Simon Tatham2009-12-27
[originally from svn r8796]