aboutsummaryrefslogtreecommitdiff
path: root/rect.c (follow)
Commit message (Collapse)AuthorAge
* The game IDs for Net (and Netslide) have always been random seedsSimon Tatham2005-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rather than literal grid descriptions, which has always faintly annoyed me because it makes it impossible to type in a grid from another source. However, Gareth pointed out that short random-seed game descriptions are useful, because you can read one out to someone else without having to master the technology of cross- machine cut and paste, or you can have two people enter the same random seed simultaneously in order to race against each other to complete the same puzzle. So both types of game ID seem to have their uses. Therefore, here's a reorganisation of the whole game ID concept. There are now two types of game ID: one has a parameter string then a hash then a piece of arbitrary random seed text, and the other has a parameter string then a colon then a literal game description. For most games, the latter is identical to the game IDs that were previously valid; for Net and Netslide, old game IDs must be translated into new ones by turning the colon into a hash, and there's a new descriptive game ID format. Random seed IDs are not guaranteed to be portable between software versions (this is a major reason why I added version reporting yesterday). Descriptive game IDs have a longer lifespan. As an added bonus, I've removed the sections of documentation dealing with game parameter encodings not shown in the game ID (Rectangles expansion factor, Solo symmetry and difficulty settings etc), because _all_ parameters must be specified in a random seed ID and therefore users can easily find out the appropriate parameter string for any settings they have configured. [originally from svn r5788]
* Allow for trailing '\0' in game_text_format() in various games.Jacob Nevins2005-05-04
| | | | [originally from svn r5743]
* Added an automatic `Solve' feature to most games. This is useful forSimon Tatham2005-05-02
| | | | | | | | | | | | | | | | various things: - if you haven't fully understood what a game is about, it gives you an immediate example of a puzzle plus its solution so you can understand it - in some games it's useful to compare your solution with the real one and see where you made a mistake - in the rearrangement games (Fifteen, Sixteen, Twiddle) it's handy to be able to get your hands on a pristine grid quickly so you can practise or experiment with manoeuvres on it - it provides a good way of debugging the games if you think you've encountered an unsolvable grid! [originally from svn r5731]
* Introduce the concept of a `game_aux_info' structure. This isSimon Tatham2005-05-02
| | | | | | | | | | constructed at the same time as an internally generated game seed, so that it can preserve any interesting information known by the program at generation time but not physically contained within the text of the game seed itself. (Such as, for example, the solution.) Currently not used for anything yet, but it will be. [originally from svn r5729]
* Copy-to-clipboard for Rectangles.Simon Tatham2005-05-01
| | | | [originally from svn r5726]
* Introduced a new function in every game which formats a game_stateSimon Tatham2005-05-01
| | | | | | | | as text. This is used by front ends to implement copy-to-clipboard. Currently the function does nothing (and is disabled) in every game except Solo, but it's a start. [originally from svn r5724]
* I can never remember what that `TRUE' means in the game structureSimon Tatham2005-05-01
| | | | | | | | | definitions, so let's move it so that it's just next to the functions it relates to. This also opens the way for me to add more booleans next to other functions without getting confused as to which is which. [originally from svn r5723]
* Rather than each game backend file exporting a whole load ofSimon Tatham2005-01-17
| | | | | | | | | | functions and a couple of variables, now each one exports a single structure containing a load of function pointers and said variables. This should make it easy to support platforms on which it's sensible to compile all the puzzles into a single monolithic application. The two existing platforms are still one-binary-per-game. [originally from svn r5126]
* Remove extraneous underscores at start and end of Rectangles seeds.Simon Tatham2004-08-17
| | | | [originally from svn r4473]
* After discussion with Simon, the game redraw functions are now passed a newJacob Nevins2004-08-16
| | | | | | | | | argument `dir' which tells them whether this redraw is due to an undo, rather than have them second-guess it from game state. Note that none of the actual games yet take advantage of this; so it hasn't been tested in anger (although it has been inspected by debugging). [originally from svn r4469]
* Robustness in the face of a completely configurable expansion factor.Simon Tatham2004-08-16
| | | | [originally from svn r4464]
* Fold in the expanded-grid mechanism for generating different kindsSimon Tatham2004-08-16
| | | | | | | | of puzzle. Configurable option, turned off by default, and not propagated in game IDs (though you can explicitly specify it in command-line parameters, and the docs explain how). [originally from svn r4461]
* Added a help file, mostly thanks to Jacob.Simon Tatham2004-08-16
| | | | [originally from svn r4460]
* Fix a memory leak.Simon Tatham2004-05-22
| | | | [originally from svn r4239]
* Introduce routines in each game module to encode a set of gameSimon Tatham2004-05-19
| | | | | | | | | | | | parameters as a string, and decode it again. This is used in midend.c to prepend the game parameters to the game seed, so that copying out of the Specific box is sufficient to completely specify the game you were playing. Throughout development of these games I have referred to `seed' internally, and `game ID' externally. Now there's a measurable difference between them! :-) [originally from svn r4231]
* Fix `visible' calculation (again).Simon Tatham2004-05-12
| | | | [originally from svn r4223]
* Ahem. Seed validation was completely broken.Simon Tatham2004-05-12
| | | | [originally from svn r4222]
* During redraws, I now do corner analysis centrally, which enables meSimon Tatham2004-05-12
| | | | | | | | | to maintain the `visible' array accurately and hence actually switch it on. This prevents us having to redraw the entire playing area on any move, which means really big grids are now sensibly playable without display lag. [originally from svn r4221]
* Remove vestigial code from the previous attempt at clever gridSimon Tatham2004-05-12
| | | | | | | generation. Grid generation should now be orders of magnitude faster at large sizes. [originally from svn r4220]
* Fiddle with the coordinate system to see if I can improve userSimon Tatham2004-05-12
| | | | | | experience. [originally from svn r4219]
* Flash on completion. Two people actually complained! :-)Simon Tatham2004-05-12
| | | | [originally from svn r4218]
* Missing draw_update call.Simon Tatham2004-05-11
| | | | [originally from svn r4216]
* Cosmetic fixes for Windows.Simon Tatham2004-05-11
| | | | [originally from svn r4212]
* We should turn off the dragging variables in the UI _whenever_Simon Tatham2004-05-11
| | | | | | | `enddrag' is TRUE, not just when the end of the drag was within a sensible range. [originally from svn r4210]
* Rectangles is now actually playable, since I've used the new UISimon Tatham2004-05-11
| | | | | | | | feature to arrange a mechanism that allows you to draw a whole rectangle at a time by dragging rather than having to click each edge individually. [originally from svn r4209]
* Framework alteration: we now support a `game_ui' structure inSimon Tatham2004-05-11
| | | | | | | | | | | | | addition to the `game_state'. The new structure is intended to contain ephemeral data pertaining to the game's user interface rather than the actual game: things stored in the UI structure are not restored in an Undo, for example. make_move() is passed the UI to modify as it wishes; it is now allowed to return the _same_ game_state it was passed, to indicate that although no move has been made there has been a UI operation requiring a redraw. [originally from svn r4207]
* Added a new game, `Rectangles', taken from nikoli.co.jp.Simon Tatham2004-05-11
[originally from svn r4206]