aboutsummaryrefslogtreecommitdiff
path: root/range.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]
* Remove the 'cheated' flag in Range's game_ui, which was stickilySimon Tatham2011-09-18
| | | | | | | | | | | | | | | | | | | | remembering whether the player had ever used the hint or solve functions, even if they then pressed undo (and even if they saved and restored). As far as Solve+Undo is concerned, this just brings Range into line with common practice in the rest of my puzzles. On the other hand, Range is the first time there's been a 'hint' function to consider in this question, so here's a policy decision: the victory flash is not a congratulation for a puzzle solved unaided, it's a confirmation that you really have reached a correct solution and haven't made any mistakes. So the only reason to omit the victory flash is if you've used the Solve operation to go straight to a guaranteed-correct solution _in a single move_; if you're using the hint button, there's still scope for you to make mistakes in all your non-hint moves, so the victory flash is still a useful indicator that you didn't. [originally from svn r9306]
* 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]
* Portability fixes, mostly from James for Palm purposes. MostlySimon Tatham2011-05-04
| | | | | | | | additions of missing 'static' and explicit 'void' in parameter lists, plus one or two other things like explicitly casting chars in variadic argument lists to int and using DBL_MAX if HUGE_VAL isn't available. [originally from svn r9166]
* 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]
* New puzzle from Jonas Koelker: 'Range', an implementation of theSimon Tatham2010-09-14
puzzle variously known (depending on which website you look at) as Kurodoko, Kuromasu or 'Where is Black Cells'. [originally from svn r8996]