aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* --version.Simon Tatham2005-05-18
| | | | [originally from svn r5806]
* It's a good idea to validate presets received from the environment.Simon Tatham2005-05-18
| | | | [originally from svn r5805]
* Move the colour configuration into midend.c so that it becomesSimon Tatham2005-05-18
| | | | | | | | | | cross-platform, and rename the environment variables so that they follow the puzzle name. Should allow a static environment configuration for each puzzle. Also introduced a <game>_PRESETS variable for people whose favourite configuration isn't on the Type menu by default. [originally from svn r5801]
* Standalone solvers were broken by my recent API changes.Simon Tatham2005-05-18
| | | | [originally from svn r5800]
* Update doc for recent changes in Restart behaviour.Jacob Nevins2005-05-17
| | | | [originally from svn r5799]
* After much thought, I've decided that `Restart' on r is not aSimon Tatham2005-05-17
| | | | | | | | particularly useful keypress, particularly given how easy it is to confuse it with `Redo'. So both r and ^R are now Redo, and Restart is relegated to being a menu-only option. [originally from svn r5796]
* Null-terminate generated Net/Netslide descriptive game IDs.Jacob Nevins2005-05-17
| | | | [originally from svn r5794]
* Keyboard shortcuts for Twiddle: abcdABCD in line with the notationSimon Tatham2005-05-17
| | | | | | | | Gareth and I have been using to analyse the game, and also the number pad. They don't work sensibly for all sizes, but they'll be handy for the most common ones. [originally from svn r5793]
* Just for Gareth: a means of overriding individual game colourSimon Tatham2005-05-17
| | | | | | | settings using environment variables. GTK frontend only, because this is an unsupported (and unprincipled) hack. [originally from svn r5792]
* `Restart' is now an undo-able action: it appends a move to the endSimon Tatham2005-05-17
| | | | | | | | | | | | | | | | | | | | of the undo list rather than destroying it. Partly this is because accidental restarts are a real pain, and partly because it allows you to compare the initial to the current state by restart-then-undo which is handy in some puzzles. In order to do this, I've introduced an additional per-entry field in the undo list in the midend, which tracks which states were created by `unusual' operations (Solve and Restart). The midend takes care of suppressing animation and completion flashes during transitions between a `special' state and its predecessor, relieving the game backends of having to do it individually. (This probably means I could remove some complexity in the flash_time() functions in most backends, but I haven't done that in this checkin.) [originally from svn r5791]
* comment c'n'p errorJacob Nevins2005-05-17
| | | | [originally from svn r5790]
* Cube's dup_game() function was missing a field. Oops.Simon Tatham2005-05-17
| | | | [originally from svn r5789]
* 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]
* Missed a vital semicolon off the Cygwin version.c makefile fragment.Simon Tatham2005-05-15
| | | | [originally from svn r5784]
* Er, except that I already had a makedist.sh. Transferred new versionSimon Tatham2005-05-15
| | | | | | code into that! [originally from svn r5783]
* Added automatic determination of the SVN revision number if a buildSimon Tatham2005-05-15
| | | | | | | takes place in a checked-out copy. Also added mkunxarc.sh which does the same version determination before building its archive. [originally from svn r5782]
* Introduce a versioning mechanism, and an `About' box in all frontSimon Tatham2005-05-15
| | | | | | | | | ends. Versioning will be done solely by Subversion revision number, since development on these puzzles is very incremental and gradual and there don't tend to be obvious points to place numbered releases. [originally from svn r5781]
* I've had two complaints that Solo ought to recognise the numericSimon Tatham2005-05-12
| | | | | | | | | | | | | | | | keypad. The reason it doesn't is because front ends were carefully translating the numeric keypad into 8-way directional keys for the benefit of Cube. Therefore, a policy change: - front ends process the numeric keypad by sending MOD_NUM_KEYPAD | '3' and similar - front ends running on a platform with Num Lock SHOULD do this _irrespective_ of the state of Num Lock - back ends do whatever they see fit with numeric keypad keys. Result: the numeric keypad now works in Solo, and also works in OS X Cube (which it previously didn't because I forgot to implement that bit of the front end!). [originally from svn r5774]
* The two Rubik-like puzzles, Sixteen and Twiddle, now support anSimon Tatham2005-05-11
| | | | | | | | | | | | | additional configuration parameter, which is the number of shuffle moves. By default the grid will be fully shuffled so that you need a general solution algorithm to untangle it, but if you prefer you can request a grid which has had (say) precisely four moves made on it, and then attempt to exactly reverse those four moves. Currently this feature is only available from the Custom box, and not in any presets. [originally from svn r5769]
* Bah. Try the r5766 fix again, this time without the typo.Simon Tatham2005-05-11
| | | | | [originally from svn r5767] [r5766 == 701cd045b36f9be1b0b8cfb74d9c191cb5813e98]
* Completion flashes were occasionally failing to be cleaned up if aSimon Tatham2005-05-11
| | | | | | | subsequent move animation began during them. Tracked this to overenthusiastic use of clip() and fixed it. [originally from svn r5766]
* solve_game() is passed the _initial_ game state, not the most recentSimon Tatham2005-05-07
| | | | | | | | | | | | | | one; so we can't just set `ret->completed = ret->movecount' and hope it's been set to something other than zero. Instead, we set both move counts to 1, which is entirely arbitrary but works. This fixes a subtle bug with the Solve feature: if you pressed Solve, then disturbed the grid, then brought it back to the solved state by making more forward moves (rather than using Undo), then the first time you did this the `Moves since auto-solve' status line would reset to zero. [originally from svn r5759]
* Add 3x3 Trivial to the presets list, and make it the default.Simon Tatham2005-05-07
| | | | [originally from svn r5757]
* Aha, here's a nice easy way to generate really hard puzzles. AddedSimon Tatham2005-05-07
| | | | | | | | | | the missing fifth difficulty level to Solo: `Unreasonable', in which even set-based reasoning is insufficient and there's no alternative but to guess a number and backtrack if it didn't work. (Solutions are still guaranteed unique, however.) In fact it now seems to take less time to generate a puzzle of this grade than `Advanced'! [originally from svn r5756]
* Fix outdated commentJacob Nevins2005-05-04
| | | | [originally from svn r5744]
* Allow for trailing '\0' in game_text_format() in various games.Jacob Nevins2005-05-04
| | | | [originally from svn r5743]
* The Twiddle shuffling algorithm was theoretically parity-unbalanced:Simon Tatham2005-05-04
| | | | | | | | | | | | | it performed a fixed number of shuffling moves, and on each one it had a 2/3 chance of flipping the permutation parity and a 1/3 chance of keeping it the same. Markov analysis shows that over a run of 1500-odd shuffle moves this will end up being an undetectably small actual bias in the parity of the generated grid, but it offends my sense of pedantry nonetheless so here's a small change to make the number of shuffling moves itself have randomly chosen parity. The parity of generated grids should now be _exactly_ 50:50. [originally from svn r5742]
* markup typoJacob Nevins2005-05-04
| | | | [originally from svn r5739]
* I've changed my mind. For the benefit of users with slowerSimon Tatham2005-05-02
| | | | | | | | computers, let's save the Solo and Pattern grids at generation time and regurgitate them when asked to solve, rather than doing all the work over again. [originally from svn r5737]
* Fix line endings when pasting on Windows.Simon Tatham2005-05-02
| | | | [originally from svn r5736]
* Forgot to mention that you can undo a Solve operation.Simon Tatham2005-05-02
| | | | [originally from svn r5734]
* Ahem. The `Solve' option in orientable Twiddle needs to correct theSimon Tatham2005-05-02
| | | | | | orientations as well as the order! [originally from svn r5733]
* Silly (but harmless) typo.Simon Tatham2005-05-02
| | | | [originally from svn r5732]
* 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]
* Oops; forgot to check in the copy-to-clipboard option for Windows.Simon Tatham2005-05-02
| | | | [originally from svn r5730]
* 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]
* It's actually vitally important, it turns out, to have all of theSimon Tatham2005-05-02
| | | | | | | | | `Cut', `Copy' and `Paste' items in the Edit menu of an OS X application - because there's nothing else that enables the keyboard cut/copy/paste shortcuts in an edit box! OS X Puzzles can now have game IDs pasted into it, which it previously couldn't. [originally from svn r5728]
* The addition of a `Copy' menu item on OS X was really beginning toSimon Tatham2005-05-01
| | | | | | | strain my unconventional menu organisation, so I've reverted to having `File' and `Edit' menus like everyone else. [originally from svn r5727]
* Copy-to-clipboard for Rectangles.Simon Tatham2005-05-01
| | | | [originally from svn r5726]
* Copy-to-clipboard facility for Fifteen, Sixteen and Twiddle.Simon Tatham2005-05-01
| | | | [originally from svn r5725]
* 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]
* Remove outdated comment :-)Simon Tatham2005-05-01
| | | | [originally from svn r5722]
* I think Windows fonts look better in bold as well.Simon Tatham2005-05-01
| | | | [originally from svn r5721]
* Fix game IDs, which I broke in the orientability change. AlsoSimon Tatham2005-04-30
| | | | | | | | introduce a sensible game ID notation for orientable games, and finally (*blush*) turn the orientability triangles back the right way up. [originally from svn r5718]
* After brainstorming with Gareth, we've decided that this is a muchSimon Tatham2005-04-30
| | | | | | | simpler and better way to indicate tile orientation than those colour bars. [originally from svn r5717]
* Bah, and of course there's a TODO comment I forgot to remove.Simon Tatham2005-04-30
| | | | [originally from svn r5714]
* Twiddle now has an additional mode in which tile orientationSimon Tatham2005-04-30
| | | | | | | matters. This mode is hard enough to scare the wossnames out of me, but that's no reason not to put it in anyway! [originally from svn r5713]
* Pango-derived fonts seem to generally look better if I ask for themSimon Tatham2005-04-30
| | | | | | in bold. [originally from svn r5709]
* New puzzle: `twiddle', generalised from a random door-unlockingSimon Tatham2005-04-30
| | | | | | gadget in Metroid Prime 2. [originally from svn r5708]