aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Support for `pencil marks' in Solo, by right-clicking and typing aSimon Tatham2005-05-25
| | | | | | | number. Many thanks to Chris Thomas, for helping with the detailed UI design by means of testing an endless series of prototypes. [originally from svn r5842]
* Mention NetWalk and update commentJacob Nevins2005-05-24
| | | | [originally from svn r5841]
* Avoid leading zeroes on internally generated random seeds, _just_ inSimon Tatham2005-05-23
| | | | | | | case they confuse anyone who expects the same seed without the leading zero to be equivalent. [originally from svn r5838]
* I'm sick of `--generate' giving the same answers if you run it twiceSimon Tatham2005-05-23
| | | | | | | in one second. Switched the Unix get_random_seed() to using gettimeofday() rather than time(). [originally from svn r5837]
* The GTK `--generate' option didn't validate the game parameters. ItSimon Tatham2005-05-23
| | | | | | does now. [originally from svn r5836]
* Net hangs if you ask it for a 2xn or nx2 wrapping puzzle with aSimon Tatham2005-05-23
| | | | | | | | | | | unique solution. This, it turns out, is because there is literally no such thing. Protective constraint added to validate_params(), with a proof in a comment alongside. If you really want a 2xn or nx2 wrapping puzzle, you can still have one if you turn uniqueness off. [originally from svn r5835]
* Aesthetic improvements, mostly suggested by Gareth.Simon Tatham2005-05-22
| | | | [originally from svn r5833]
* Forgot to add print.py to the source archive. Ahem.Simon Tatham2005-05-22
| | | | [originally from svn r5830]
* Another tweak to the solver to make it handle blank tiles correctly.Simon Tatham2005-05-22
| | | | | | | | The previous checkin stopped it choking on them, but it didn't actually manage to _deduce_ that all the edges bordering them had to be closed. Now it does better. [originally from svn r5829]
* Special case in dead-end checking which prevents the solver fallingSimon Tatham2005-05-22
| | | | | | | | | | | | over on a grid containing a 0 (completely blank) tile. This can't happen in self-generated grids, but can happen if you type in a grid from another Net implementation. Previously, the solver would notice (technically correctly!) that a completely blank tile connects to no other tiles and thus forms an isolated subgraph, and would therefore complain that no orientation of that tile could possibly yield a valid solution... [originally from svn r5828]
* The Net solver now makes use of barrier information when applied toSimon Tatham2005-05-22
| | | | | | a typed-in grid. [originally from svn r5827]
* It occurred to me yesterday that Net could perfectly well be playedSimon Tatham2005-05-22
| | | | | | on paper, so here's a routine to print it out. [originally from svn r5826]
* Ensure that an old random seed isn't left around for the user to see when aJacob Nevins2005-05-21
| | | | | | | descriptive ID has been specified. Fix tiny memory leak. [originally from svn r5825]
* Cleanups:Simon Tatham2005-05-21
| | | | | | | | | - fix documentation of Net's unique solution option (should have tested before last checkin) - make unique solutions optional in Rectangles too (same reasons) - tidy up various issues in parameter encoding in both games. [originally from svn r5818]
* Solution uniqueness for Net. Can be disabled on request (but isSimon Tatham2005-05-21
| | | | | | | | enabled by default), since ambiguous sections in grids can present additional interesting challenges. I think uniqueness is a better default, though. [originally from svn r5816]
* Move IDM_ABOUT so that it doesn't overlap the presets space! Ahem.Simon Tatham2005-05-20
| | | | [originally from svn r5814]
* Cunning way to ensure unique solutions in generated RectanglesSimon Tatham2005-05-19
| | | | | | | | | | | | | | | | | puzzles. I generate the grid of rectangles as normal, but before I place the numbers I run it through a non-deterministic solver algorithm which tries to do as much as it can with as little information about where the numbers are going to be. The solver itself narrows down the number placement when it runs out of steam, but does so as little as possible. Once it reaches a state where it has ensured solubility, and then the generation algorithm chooses random number placement from whatever's left. Occasionally it paints itself into a corner and can't ensure a unique solution no matter what happens; in that situation we just have to give up, generate a fresh grid, and try again. [originally from svn r5809]
* If you paste in a random seed with different ephemeral parametersSimon Tatham2005-05-18
| | | | | | | | | | from the currently configured ones, and then bring the Random Seed box back up, the wrong parameters get shown, and the resulting random seed is incorrect for the current game. At least, it was, until this checkin. [originally from svn r5808]
* Rectangles random seed IDs shouldn't bother stating the expansionSimon Tatham2005-05-18
| | | | | | factor if it's zero. [originally from svn r5807]
* --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]