aboutsummaryrefslogtreecommitdiff
path: root/galaxies.c (follow)
Commit message (Collapse)AuthorAge
...
* Enforce more than one dot in Galaxies puzzles.Chris Boyle2015-09-26
| | | | | | | | At minimum size (3x3) Galaxies can generate a pre-solved single dot game. You have to add and remove a line to get the victory flash which is a bit weird, so just prevent this.
* Handle replacing an existing arrowKevin Lyles2015-05-11
|
* Fix the extra arrow hanging around while moving the opposite existing arrowKevin Lyles2015-05-11
|
* Mark some arguments constantKevin Lyles2015-05-11
|
* Fix the issue with adding only one arrow when the other end was already whiteKevin Lyles2015-05-11
|
* Add/remove the opposite arrow when you let goKevin Lyles2015-05-11
|
* Draw the opposite arrow only while draggingKevin Lyles2015-05-11
|
* Moved all function declarations to the top of the fileKevin Lyles2015-05-11
|
* Use the game_state and space typedefsKevin Lyles2015-05-11
|
* Always use ret instead of state in execute_moveKevin Lyles2015-05-11
|
* Fixed a typo in a commentKevin Lyles2015-05-11
|
* Giant const patch of doom: add a 'const' to every parameter in everySimon Tatham2013-04-13
| | | | | | | | | | | | | | puzzle backend function which ought to have it, and propagate those consts through to per-puzzle subroutines as needed. I've recently had to do that to a few specific parameters which were being misused by particular puzzles (r9657, r9830), which suggests that it's probably a good idea to do the whole lot pre-emptively before the next such problem shows up. [originally from svn r9832] [r9657 == 3b250baa02a7332510685948bf17576c397b8ceb] [r9830 == 0b93de904a98f119b1a95d3a53029f1ed4bfb9b3]
* Add 'const' to the game_params arguments in validate_desc andSimon Tatham2013-04-12
| | | | | | | | | | | | new_desc. Oddities in the 'make test' output brought to my attention that a few puzzles have been modifying their input game_params for various reasons; they shouldn't do that, because that's the game_params held permanently by the midend and it will affect subsequent game generations if they modify it. So now those arguments are const, and all the games which previously modified their game_params now take a copy and modify that instead. [originally from svn r9830]
* 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]
* Swap a 'max' for a 'min', fixing an out-of-range colour componentSimon Tatham2012-04-08
| | | | | | being passed to the front end. [originally from svn r9451]
* 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]
* Memory management and other fixes from James H.Simon Tatham2009-06-17
| | | | [originally from svn r8596]
* Keyboard cursor support in Galaxies, by James H.Simon Tatham2009-01-15
| | | | [originally from svn r8413]
* New infrastructure feature. Games are now permitted to beSimon Tatham2008-09-06
| | | | | | | | | | | | | | | | | | | | | | _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]
* Revise the printing colour framework so that we can explicitlySimon Tatham2008-04-07
| | | | | | | request either of hatching or halftoning, and also choose which to supply as a fallback when printing in colour. [originally from svn r7976]
* Kyle Brazell points out that the completion checker considers aSimon Tatham2007-03-23
| | | | | | | region valid if it has _a_ dot at its centre of symmetry, even if that dot isn't actually within the region in question. [originally from svn r7407]
* My favourite kind of patch, from James H: one which decreases theSimon Tatham2007-03-03
| | | | | | | | | | | | amount of code. James has ripped out the solver's version of check_complete(), in favour of using the one I wrote for the game-playing UI. My one checks connectedness, which means that the solver will now not believe non-solutions to puzzles where connectedness becomes a difficult issue. Examples of game IDs which are now solved correctly but were previously not are 5x3:ubb and 7x7:ajfzmfqgtdzgt. [originally from svn r7362]
* Fix problems with arrow UI with non-square grid.Jacob Nevins2007-03-02
| | | | [originally from svn r7355]
* Silliness! Here's a somewhat hacky patch which builds an additionalSimon Tatham2007-03-01
| | | | | | | | | | | | | | | | | binary from the Galaxies source file. The function of the new `galaxiespicture' is to take a .xbm bitmap on standard input and convert it into a Galaxies game ID using both black and white dots, such that when solved the puzzle displays the input bitmap. In the process of this I've implemented a post-processing pass after the main game generation, to prevent clusters of adjacent singletons. James H already solved that problem for unconstrained game generation, but for some reason it came back when I did this. However, the post-processing pass is still turned off for normal usage, on the basis that (a) if it ain't broke don't fix it, and (b) it's rather slow and best avoided if not necessary. [originally from svn r7354]
* Cleanup patch from James H: disable the `s' key, which was only inSimon Tatham2007-03-01
| | | | | | there by accident. [originally from svn r7351]
* Bound edge thicknesses below so that they're always thicker than theSimon Tatham2007-03-01
| | | | | | grid lines. [originally from svn r7349]
* General cleanups patch from James H:Simon Tatham2007-02-28
| | | | | | | | | | | | - missing static in filling.c - better robustness in execute_move() in filling.c - remove side effects in assert statements - remove rogue diagnostic in galaxies.c - remove // comment in map.c - add more stylus-friendly UI to Pattern - bias Unequal towards generating inequality clues rather than numeric [originally from svn r7344]
* Gary Wong points out a couple of minor errors in the setting ofSimon Tatham2007-02-28
| | | | | | `used_solve'. [originally from svn r7343]
* Dariusz Olszewski's changes to support compiling for PocketPC. ThisSimon Tatham2007-02-26
| | | | | | | | | | | | is mostly done with ifdefs in windows.c; so mkfiles.pl generates a new makefile (Makefile.wce) and Recipe enables it, but it's hardly any different from Makefile.vc apart from a few definitions at the top of the files. Currently the PocketPC build is not enabled in the build script, but with any luck I'll be able to do so reasonably soon. [originally from svn r7337]
* Galaxies doesn't print in colour.Simon Tatham2007-02-25
| | | | [originally from svn r7334]
* Fix a UI glitch where dragging an existing arrow could change what itJacob Nevins2007-02-25
| | | | | | referred to. [originally from svn r7331]
* Somehow I let a couple of // comments get past me when I acceptedSimon Tatham2007-02-24
| | | | | | this file. Remove them. [originally from svn r7318]
* And fix the error _I_ made in r7311. I should stop coding now,Simon Tatham2007-02-22
| | | | | | | because I'm clearly too sleepy to get it right. [originally from svn r7312] [r7311 == 8c0890a331d93c9d12ef782601b9953463872fc6]
* Part of r7310 completely changed the careful semantics of mySimon Tatham2007-02-22
| | | | | | | | coordinate-rounding, causing picking up arrows from a dot anywhere other than at the centre of a square to break. [originally from svn r7311] [r7310 == a428c5899de86897fe4e92fa6585b3c3908ce2ad]
* Patch from James H to make the Palm compiler stop objecting to mySimon Tatham2007-02-22
| | | | | | | (as far as I could tell) perfectly legal use of floats, and also remove some VC warnings. [originally from svn r7310]
* We may reluctantly permit the returning of a too-easy puzzle if anSimon Tatham2007-02-22
| | | | | | | | | | | | | | | adequately hard one couldn't be found, but we must never return a puzzle harder than the user asked for, and we _certainly_ mustn't return one that we aren't even sure has a unique solution. However, when I attempted to implement this rule, it turned out that an attempt to generate a 15x15 Easy puzzle didn't terminate before I got bored and killed it. I'm therefore retiring the Easy difficulty level on the grounds that it's not a wide enough band to be useful. I've renamed Hard to Normal, and (while I was there) renamed Recursive to Unreasonable in line with my normal practice. [originally from svn r7309]
* Add James Harvey's excellent new puzzle, `Galaxies'.Simon Tatham2007-02-22
[originally from svn r7304]