aboutsummaryrefslogtreecommitdiff
path: root/singles.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]
* For the convenience of Linux package maintainers, add to Makefile.gtkSimon Tatham2012-08-17
| | | | | | | | | | | | | and Makefile.doc a command-line parameter 'BINPREFIX' which will be prepended to all the game binary names. E.g. 'make BINPREFIX=sgt-' and 'make BINPREFIX=sgt- install', and correspondingly 'make -f Makefile.doc BINPREFIX=sgt-'. Also included in this commit by mistake, changes to singles.c to add \n to the end of all its debug() statements. I meant to commit that separately. Oops. [originally from svn r9606]
* 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]
* 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]
* Fix incorrect uses of ctype.h (passing it uncast chars, or otherSimon Tatham2010-04-17
| | | | | | things potentially not in the range 0..255). [originally from svn r8922]
* Patch from James H to fix a bug in which ambiguous puzzles wouldSimon Tatham2010-01-17
| | | | | | occasionally be generated, e.g. by 8x8de#417341658689473 . [originally from svn r8845]
* Don't use payload strings directly as the format for printf.Simon Tatham2010-01-13
| | | | [originally from svn r8839]
* Couple of small changes to Singles from James H which missed my mainSimon Tatham2010-01-12
| | | | | | | commit: tweak the grid generation a bit, and fix the use of the Solve function on a grid containing errors. [originally from svn r8835]
* New puzzle from James Harvey: 'Singles', an implementation ofSimon Tatham2010-01-11
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]