aboutsummaryrefslogtreecommitdiff
path: root/solo.c (follow)
Commit message (Collapse)AuthorAge
* Standalone solvers were broken by my recent API changes.Simon Tatham2005-05-18
| | | | [originally from svn r5800]
* 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]
* 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]
* 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]
* 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]
* 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]
* 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]
* Correct block coordinate display when standalone solver shows itsSimon Tatham2005-04-29
| | | | | | working. [originally from svn r5706]
* Fix inconsistent vertical centring of text in GTK (and update Solo'sSimon Tatham2005-04-27
| | | | | | | todo list, which complained about this because Solo was the only puzzle noticeably affected). [originally from svn r5694]
* Command-line solver was dividing up non-square puzzles the wrong waySimon Tatham2005-04-27
| | | | | | round. [originally from svn r5691]
* The command-line solver's difficulty gradings now use the sameSimon Tatham2005-04-26
| | | | | | terminology as the puzzle GUI. [originally from svn r5683]
* Implement the remaining modes of reasoning in nsolve, and thusSimon Tatham2005-04-26
| | | | | | | | | | | | enable configurable puzzle difficulty. I'm only generating grids up to Times level (complicated non-recursive analysis but guessing never required); I wouldn't object to providing a Telegraph difficulty level (guessing required) but it turns out to be very hard indeed to generate at random. I might still add it later (probably under the name `Unreasonable' :-) if I can think of an efficient way to find them. [originally from svn r5682]
* Fix trivial UI glitch involving clicking on the border outside theSimon Tatham2005-04-26
| | | | | | | grid. I'm really starting to get annoyed by the default round- towards-zero behaviour of C integer division. [originally from svn r5681]
* Remove some legacy debugging code which was breaking the MinGWSimon Tatham2005-04-25
| | | | | | | build, and which is redundant given the new standalone solver functionality. [originally from svn r5672]
* Oops; _actually_ add the reasoning mode I mentioned in the lastSimon Tatham2005-04-25
| | | | | | checkin. [originally from svn r5671]
* Various changes prompted by my boss taking an interest:Simon Tatham2005-04-25
| | | | | | | | | | | | | - added a compilation option -DSTANDALONE_SOLVER which makes both of Solo's internal solvers accessible from the command line. - fix a bug in nsolve turned up by testing in this mode: it failed to iterate at all! Oddly, this massive improvement to the effectiveness of nsolve hasn't emptied the generated grids by very much. - add an extra mode of reasoning to my to-do list (which is the dual of one already there, so I'm kicking myself). [originally from svn r5670]
* Outstandingly cute mathematical transformation which allows me toSimon Tatham2005-04-24
| | | | | | lose a lot of code duplication in nsolve while preserving efficiency. [originally from svn r5667]
* Introduce configurable symmetry type in generated puzzles, and dropSimon Tatham2005-04-24
| | | | | | | | the default symmetry from order-4 down to order-2, which seems to mitigate the excessively-full-grid problem by permitting more freedom to remove stuff. [originally from svn r5666]
* Visual C points out a couple of typos.Simon Tatham2005-04-23
| | | | [originally from svn r5661]
* Initial checkin of `Solo', the number-placing puzzle popularised bySimon Tatham2005-04-23
the Times under the name `Sudoku'. [originally from svn r5660]