X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/5f6050b48744199163452234e48f4e637e6d1e7d..13c4d60d66018a828361293c9f71e5cda1d16c11:/puzzles.but diff --git a/puzzles.but b/puzzles.but index 5f34a83..eadf971 100644 --- a/puzzles.but +++ b/puzzles.but @@ -20,9 +20,11 @@ \define{by} \u00D7{x} +\define{dash} \u2013{-} + This is a collection of small one-player puzzle games. -\copyright This manual is copyright 2004 Simon Tatham. All rights +\copyright This manual is copyright 2004-5 Simon Tatham. All rights reserved. You may distribute this documentation under the MIT licence. See \k{licence} for the licence text in full. @@ -43,16 +45,15 @@ both, and have more recently done a port to Mac OS X as well. When I find (or perhaps invent) further puzzle games that I like, they'll be added to this collection and will immediately be available on both platforms. And if anyone feels like writing any other front -ends - PocketPC, Mac OS pre-10, or whatever it might be - then all -the games in this framework will immediately become available on -another platform as well. +ends \dash PocketPC, Mac OS pre-10, or whatever it might be \dash +then all the games in this framework will immediately become +available on another platform as well. -The actual games in this collection were mostly not my invention; I -saw them elsewhere, and rewrote them in a form that was more -convenient for me. I do not claim credit, in general, for inventing -the rules of any of these puzzles; all I claim is authorship of the -code (or at least those parts of the code that weren't contributed -by other people!). +The actual games in this collection were mostly not my invention; they +are re-implementations of existing game concepts within my portable +puzzle framework. I do not claim credit, in general, for inventing the +rules of any of these puzzles. (I don't even claim authorship of all +the code; some of the puzzles have been submitted by other authors.) This collection is distributed under the \i{MIT licence} (see \k{licence}). This means that you can do pretty much anything you like @@ -94,6 +95,22 @@ menu}\q{Edit} menus instead.) \dd Resets the current game to its initial state. (This can be undone.) +\dt \ii\e{Load} + +\dd Loads a saved game from a file on disk. + +\dt \ii\e{Save} + +\dd Saves the current state of your game to a file on disk. + +\lcont{ + +The Load and Save operations should preserve your entire game +history (so you can save, reload, and still Undo and Redo things you +had done before saving). + +} + \dt \ii\e{Undo} (\q{U}, Ctrl+\q{Z}, Ctrl+\q{_}) \dd Undoes a single move. (You can undo moves back to the start of the @@ -314,6 +331,8 @@ controls are: \dt \e{Rotate tile clockwise}: right mouse button, \q{D} key +\dt \e{Rotate tile by 180 degrees}: \q{F} key + \dt \e{Lock (or unlock) tile}: middle mouse button, shift-click, \q{S} key \dd You can lock a tile once you're sure of its orientation. You can @@ -942,11 +961,6 @@ Removing a region causes the rest of the grid to shuffle up: blocks that are suspended will fall down (first), and then empty columns are filled from the right. -The game generator does not try to guarantee soluble grids; -it will, however, ensure that there are at least 2 squares of each -colour on the grid at the start (and will forbid custom grids for which -that would be impossible). - Same Game was contributed to this collection by James Harvey. \H{samegame-controls} \i{Same Game controls} @@ -992,6 +1006,23 @@ any points at all. With the alternative \q{(n-1)^2} system, regions of two squares score a point each, and larger regions score relatively more points. +\dt \e{Ensure solubility} + +\dd If this option is ticked (the default state), generated grids +will be guaranteed to have at least one solution. + +\lcont{ + +If you turn it off, the game generator will not try to guarantee +soluble grids; it will, however, still ensure that there are at +least 2 squares of each colour on the grid at the start (since a +grid with exactly one square of a given colour is \e{definitely} +insoluble). Grids generated with this option disabled may contain +more large areas of contiguous colour, leading to opportunities for +higher scores; they can also take less time to generate. + +} + \C{flip} \i{Flip} @@ -1011,7 +1042,11 @@ change when you flip it. \IM{Flip controls} keys, for Flip \IM{Flip controls} shortcuts (keyboard), for Flip -Left-click in a square to flip it and its associated squares. +This game can be played with either the keyboard or the mouse. + +Left-click in a square to flip it and its associated squares, or +use the cursor keys to choose a square and the space bar or Enter +key to flip. If you use the \q{Solve} function on this game, it will mark some of the squares in red. If you click once in every square with a red @@ -1038,6 +1073,575 @@ causes every square to flip itself and its four immediate neighbours the game is different every time. +\C{guess} \i{Guess} + +\cfg{winhelp-topic}{games.guess} + +You have a set of coloured pegs, and have to reproduce a +predetermined sequence of them (chosen by the computer) within a +certain number of guesses. + +Each guess gets marked with the number of correctly-coloured pegs +in the correct places (in black), and also the number of +correctly-coloured pegs in the wrong places (in white). + +This game is also known (and marketed, by Hasbro, mainly) as +a board game \q{Mastermind}, with 6 colours, 4 pegs per row, and 10 guesses. +However, this version allows custom settings of number of colours +(up to 10), number of pegs per row, and number of guesses. + +Guess was contributed to this collection by James Harvey. + +\H{guess-controls} \i{Guess controls} + +\IM{Guess controls} controls, for Guess +\IM{Guess controls} keys, for Guess +\IM{Guess controls} shortcuts (keyboard), for Guess + +This game can be played with either the keyboard or the mouse. + +With the mouse, drag a coloured peg from the tray on the left-hand +side to its required position in the current guess; pegs may also be +dragged from current and past guesses to copy them elsewhere. To +remove a peg, drag it off its current position to somewhere invalid. + +Right-clicking in the current guess adds a \q{hold} marker; pegs +that have hold markers will be automatically added to the next guess +after marking. + +Alternatively, with the keyboard, the up and down cursor keys can be +used to select a peg colour, the left and right keys to select a +peg position, and the space bar or Enter key to place a peg of the +selected colour in the chosen position. \q{D} or Backspace removes a +peg, and \q{H} adds a hold marker. + +When the guess is complete, the smaller feedback pegs will be highlighted; +clicking on these (or moving the peg cursor to them with the arrow keys +and pressing the space bar or Enter key) will mark the current guess, +copy any held pegs to the next guess, and move the \q{current guess} +marker. + +If you correctly position all the pegs the solution will be displayed +below; if you run out of guesses (or select \q{Solve...}) the solution +will also be revealed. + +\H{guess-parameters} \I{parameters, for Guess}Guess parameters + +These parameters are available from the \q{Custom...} option on the +\q{Type} menu. The default game matches the parameters for the +board game \q{Mastermind}. + +\dt \e{Colours} + +\dd Number of colours the solution is chosen from; from 2 to 10 +(more is harder). + +\dt \e{Pegs per guess} + +\dd Number of pegs per guess (more is harder). + +\dt \e{Guesses} + +\dd Number of guesses you have to find the solution in (fewer is harder). + +\dt \e{Allow blanks} + +\dd Allows blank pegs to be given as part of a guess (makes it easier, because +you know that those will never be counted as part of the solution). This +is turned off by default. + +Note that this doesn't allow blank pegs in the solution; if you really wanted +that, use one extra colour. + +\dt \e{Allow duplicates} + +\dd Allows the solution (and the guesses) to contain colours more than once; +this increases the search space (making things harder), and is turned on by +default. + + +\C{pegs} \i{Pegs} + +\cfg{winhelp-topic}{games.pegs} + +A number of pegs are placed in holes on a board. You can remove a +peg by jumping an adjacent peg over it (horizontally or vertically) +to a vacant hole on the other side. Your aim is to remove all but one +of the pegs initially present. + +This game, best known as \q{Peg Solitaire}, is possibly one of the +oldest puzzle games still commonly known. + +\H{pegs-controls} \i{Pegs controls} + +\IM{Pegs controls} controls, for Pegs + +To move a peg, drag it with the mouse from its current position to +its final position. If the final position is exactly two holes away +from the initial position, is currently unoccupied by a peg, and +there is a peg in the intervening square, the move will be permitted +and the intervening peg will be removed. + +Vacant spaces which you can move a peg into are marked with holes. A +space with no peg and no hole is not available for moving at all: it +is an obstacle which you must work around. + + +\H{pegs-parameters} \I{parameters, for Pegs}Pegs parameters + +These parameters are available from the \q{Custom...} option on the +\q{Type} menu. + +\dt \e{Width}, \e{Height} + +\dd Size of grid in holes. + +\dt \e{Board type} + +\dd Controls whether you are given a board of a standard shape or a +randomly generated shape. The two standard shapes currently +supported are \q{Cross} and \q{Octagon} (also commonly known as the +English and European traditional board layouts respectively). +Selecting \q{Random} will give you a different board shape every +time (but always one that is known to have a solution). + + +\C{dominosa} \i{Dominosa} + +\cfg{winhelp-topic}{games.dominosa} + +A normal set of dominoes \dash that is, one instance of every +(unordered) pair of numbers from 0 to 6 \dash has been arranged +irregularly into a rectangle; then the number in each square has +been written down and the dominoes themselves removed. Your task is +to reconstruct the pattern by arranging the set of dominoes to match +the provided array of numbers. + +This puzzle is widely credited to O. S. Adler, and takes part of its +name from those initials. + +\H{dominosa-controls} \i{Dominosa controls} + +\IM{Dominosa controls} controls, for Dominosa + +Left-clicking between any two adjacent numbers places a domino +covering them, or removes one if it is already present. Trying to +place a domino which overlaps existing dominoes will remove the ones +it overlaps. + +Right-clicking between two adjacent numbers draws a line between +them, which you can use to remind yourself that you know those two +numbers are \e{not} covered by a single domino. Right-clicking again +removes the line. + + +\H{dominosa-parameters} \I{parameters, for Dominosa}Dominosa parameters + +These parameters are available from the \q{Custom...} option on the +\q{Type} menu. + +\dt \e{Maximum number on dominoes} + +\dd Controls the size of the puzzle, by controlling the size of the +set of dominoes used to make it. Dominoes with numbers going up to N +will give rise to an (N+2) \by (N+1) rectangle; so, in particular, +the default value of 6 gives an 8\by\.7 grid. + +\dt \e{Ensure unique solution} + +\dd Normally, Dominosa will make sure that the puzzles it presents +have only one solution. Puzzles with ambiguous sections can be more +difficult and sometimes more subtle, so if you like you can turn off +this feature. Also, finding \e{all} the possible solutions can be an +additional challenge for an advanced player. Turning off this option +can also speed up puzzle generation. + + +\C{untangle} \i{Untangle} + +\cfg{winhelp-topic}{games.untangle} + +You are given a number of points, some of which have lines drawn +between them. You can move the points about arbitrarily; your aim is +to position the points so that no line crosses another. + +I originally saw this in the form of a Flash game called \i{Planarity} +\k{Planarity}, written by John Tantalo. + +\B{Planarity} \W{http://home.cwru.edu/~jnt5/Planarity}\cw{http://home.cwru.edu/~jnt5/Planarity} + +\H{untangle-controls} \i{Untangle controls} + +\IM{Untangle controls} controls, for Untangle + +To move a point, click on it with the left mouse button and drag it +into a new position. + +\H{untangle-parameters} \I{parameters, for Untangle}Untangle parameters + +There is only one parameter available from the \q{Custom...} option +on the \q{Type} menu: + +\dt \e{Number of points} + +\dd Controls the size of the puzzle, by specifying the number of +points in the generated graph. + + +\C{blackbox} \i{Black Box} + +\cfg{winhelp-topic}{games.blackbox} + +A number of balls are hidden in a rectangular arena. You have to +deduce the positions of the balls by firing lasers from positions +on the edge of the arena and observing how they are deflected. + +Lasers will fire straight until they hit the opposite side of the +arena (at which point they emerge), unless affected by balls in one of +the following ways: + +\b A laser that hits a ball head-on is absorbed and will never re-emerge. + This includes lasers that meet a ball on the first rank of the arena. + +\b A laser with a ball to its front-left square gets deflected 90 degrees + to the right. + +\b A laser with a ball to its front-right square gets similarly deflected + to the left. + +\b A laser that would re-emerge from the entry location is considered to be + \q{reflected}. + +\b A laser which would get deflected before entering the arena (down the + \q{firing range}) by a ball to the front-left or front-right of its + entry point is also considered to be \q{reflected}. + +Lasers that are reflected appear as a \q{R}; lasers that hit balls +dead-on appear as \q{H}. Otherwise, a number appears at the firing point +and the location where the laser emerges (this number is unique to +that shot). + +You can place guesses as to the location of the balls, based on the +entry and exit patterns of the lasers; once you have placed enough +balls a button appears enabling you to have your guesses checked. + +Here is a diagram showing how the positions of balls can create each +of the laser behaviours shown above: + +\c 1RHR---- +\c |..O.O...| +\c 2........3 +\c |........| +\c |........| +\c 3........| +\c |......O.| +\c H........| +\c |.....O..| +\c 12-RH--- + +As shown, it is possible for a ball to receive multiple reflections +before re-emerging (see turn 3). Similarly, a ball may be reflected +(possibly more than once) before receiving a hit (the \q{H} on the +left side of the example). + +Note that any layout with more that 4 balls may have a non-unique +solution. The following diagram illustrates this; if you know the +board contains 5 balls, it is impossible to determine where the fifth +ball is (possible positions marked with an x): + +\c -------- +\c |........| +\c |........| +\c |..O..O..| +\c |...xx...| +\c |...xx...| +\c |..O..O..| +\c |........| +\c |........| +\c -------- + +For this reason when you have your guesses checked the game will +check that your solution \e{produces the same results} as the +computer's, rather than that your solution is identical to the +computer's. So in the above example, you could put the fifth ball at +\e{any} of the locations marked with an x, and you would still win. + +Black Box was contributed to this collection by James Harvey. + +\H{blackbox-controls} \i{Black Box controls} + +\IM{Black Box controls}controls, for Black Box + +To fire a laser, left-click in a square around the side of the arena. +The results will be displayed immediately. Lasers may not be fired +twice (because the results will never change). Holding down the left +button will highlight the current go (or a previous go) to confirm the +exit point for that laser, if applicable. + +To guess the location of a ball, left-click within the arena and a +black circle will appear marking the guess; to remove the guessed ball +click again. + +Locations in the arena may be locked against modification by +right-clicking; whole rows and columns may be similarly locked by +right-clicking in the laser firing range above/below that column, or +to the left/right of that row. + +When an appropriate number of balls have been guessed a button will +appear at the top-left corner of the grid; clicking that will mark +your guesses. + +If you click the \q{mark} button and your guesses are not correct, +the game will show you as little information as possible to +demonstrate this to you, so you can try again. If your ball +positions are not consistent with the laser paths you already know +about, one laser path will be circled to indicate that it proves you +wrong. If your positions match all the existing laser paths but are +still wrong, one new laser path will be revealed (written in red) +which is not consistent with your current guesses. + +If you decide to give up completely, you can select Solve to reveal +the actual ball positions. At this point, correctly-placed balls +will be displayed as filled black circles; incorrectly-placed balls +are displayed as filled black circles with red crosses, and missing +balls are filled red circles. In addition, a red circle marks any +laser you had already fired which is not consistent with your ball +layout (just as when you press the mark button), and red text marks +any laser you \e{could} have fired in order to distinguish your ball +layout from the right one. + +(All the actions described in \k{common-actions} are also available.) + +\H{blackbox-parameters} \I{parameters, for Black Box}Black Box parameters + +These parameters are available from the \q{Custom...} option on the +\q{Type} menu. + +\dt \e{Width}, \e{Height} + +\dd Size of grid in squares. There are 2 \by \e{Width} \by \e{Height} lasers +per grid, two per row and two per column. + +\dt \e{No. of balls} + +\dd Number of balls to place in the grid. This can be a single number, +or a range (separated with a hyphen, like \q{2-6}), and determines the +number of balls to place on the grid. The \q{reveal} button is only +enabled if you have guessed an appropriate number of balls; a guess +using a different number to the original solution is still acceptable, +if all the laser inputs and outputs match. + + +\C{slant} \i{Slant} + +\cfg{winhelp-topic}{games.slant} + +You have a grid of squares. Your aim is to draw a diagonal line +through each square, and choose which way each line slants so that +the following conditions are met: + +\b The diagonal lines never form a loop. + +\b Any point with a circled number has precisely that many lines +meeting at it. (Thus, a 4 is the centre of a cross shape, whereas a +zero is the centre of a diamond shape \dash or rather, a partial +diamond shape, because a zero can never appear in the middle of the +grid because that would immediately cause a loop.) + +Credit for this puzzle goes to \i{Nikoli} \k{nikoli-slant}. + +\B{nikoli-slant} +\W{http://www.nikoli.co.jp/puzzles/39/index.htm}\cw{http://www.nikoli.co.jp/puzzles/39/index.htm} +(in Japanese) + + +\H{slant-controls} \i{Slant controls} + +\IM{Slant controls} controls, for Slant +\IM{Slant controls} keys, for Slant +\IM{Slant controls} shortcuts (keyboard), for Slant + +Left-clicking in a blank square will place a \cw{\\} in it (a line +leaning to the left, i.e. running from the top left of the square to +the bottom right). Right-clicking in a blank square will place a +\cw{/} in it (leaning to the right, running from top right to bottom +left). + +Continuing to click either button will cycle between the three +possible square contents. Thus, if you left-click repeatedly in a +blank square it will change from blank to \cw{\\} to \cw{/} back to +blank, and if you right-click repeatedly the square will change from +blank to \cw{/} to \cw{\\} back to blank. (Therefore, you can play +the game entirely with one button if you need to.) + +(All the actions described in \k{common-actions} are also available.) + +\H{slant-parameters} \I{parameters, for Slant}Slant parameters + +These parameters are available from the \q{Custom...} option on the +\q{Type} menu. + +\dt \e{Width}, \e{Height} + +\dd Size of grid in squares. + +\dt \e{Difficulty} + +\dd Controls the difficulty of the generated puzzle. At Hard level, +you are required to do deductions based on knowledge of +\e{relationships} between squares rather than always being able to +deduce the exact contents of one square at a time. (For example, you +might know that two squares slant in the same direction, even if you +don't yet know what that direction is, and this might enable you to +deduce something about still other squares.) Even at Hard level, +guesswork and backtracking should never be necessary. + + +\C{lightup} \i{Light Up} + +\cfg{winhelp-topic}{games.lightup} + +You have a grid of squares. Some are filled in black; some of the +black squares are numbered. Your aim is to \q{light up} all the +empty squares by placing light bulbs in some of them. + +Each light bulb illuminates the square it is on, plus all squares in +line with it horizontally or vertically unless a black square is +blocking the way. + +To win the game, you must satisfy the following conditions: + +\b All non-black squares are lit. + +\b No light is lit by another light. + +\b All numbered black squares have exactly that number of lights adjacent to + them (in the four squares above, below, and to the side). + +Non-numbered black squares may have any number of lights adjacent to them. + +Credit for this puzzle goes to \i{Nikoli} \k{nikoli-lightup}. + +Light Up was contributed to this collection by James Harvey. + +\B{nikoli-lightup} +\W{http://www.nikoli.co.jp/puzzles/32/index-e.htm}\cw{http://www.nikoli.co.jp/puzzles/32/index-e.htm} +(beware of Flash) + +\H{lightup-controls} \i{Light Up controls} + +\IM{Light Up controls} controls, for Light Up +\IM{Light Up controls} keys, for Light Up +\IM{Light Up controls} shortcuts (keyboard), for Light Up + +Left-clicking in a non-black square will toggle the presence of a light +in that square. Right-clicking in a non-black square toggles a mark there to aid +solving; it can be used to highlight squares that cannot be lit, for example. + +You may not place a light in a marked square, nor place a mark in a lit square. + +The game will highlight obvious errors in red. Lights lit by other +lights are highlighted in this way, as are numbered squares which +do not (or cannot) have the right number of lights next to them. + +Thus, the grid is solved when all non-black squares have yellow +highlights and there are no red lights. + + +\H{lightup-parameters} \I{parameters, for Light Up}Light Up parameters + +These parameters are available from the \q{Custom...} option on the +\q{Type} menu. + +\dt \e{Width}, \e{Height} + +\dd Size of grid in squares. + +\dt \e{%age of black squares} + +\dd Rough percentage of black squares in the grid. + +\lcont{ + +This is a hint rather than an instruction. If the grid generator is +unable to generate a puzzle to this precise specification, it will +increase the proportion of black squares until it can. + +} + +\dt \e{Symmetry} + +\dd Allows you to specify the required symmetry of the black squares +in the grid. (This does not affect the difficulty of the puzzles +noticeably.) + +\dt \e{Difficulty} + +\dd \q{Easy} means that the puzzles should be soluble without +backtracking or guessing, \q{Hard} means that some guesses will +probably be necessary. + + +\C{map} \i{Map} + +\cfg{winhelp-topic}{games.map} + +You are given a map consisting of a number of regions. Your task is +to colour each region with one of four colours, in such a way that +no two regions sharing a boundary have the same colour. You are +provided with some regions already coloured, sufficient to make the +remainder of the solution unique. + +Only regions which share a length of border are required to be +different colours. Two regions which meet at only one \e{point} +(i.e. are diagonally separated) may be the same colour. + +I believe this puzzle is original; I've never seen an implementation +of it anywhere else. The concept of a four-colouring puzzle was +suggested by Owen Dunn; credit must also go to Nikoli and to Verity +Allan for inspiring the train of thought that led to me realising +Owen's suggestion was a viable puzzle. Thanks also to Gareth Taylor +for many detailed suggestions. + + +\H{map-controls} \i{Map controls} + +\IM{Map controls} controls, for Map +\IM{Map controls} keys, for Map +\IM{Map controls} shortcuts (keyboard), for Map + +To colour a region, click on an existing region of the desired +colour and drag that colour into the new region. + +(The program will always ensure the starting puzzle has at least one +region of each colour, so that this is always possible!) + +If you need to clear a region, you can drag from an empty region, or +from the puzzle boundary if there are no empty regions left. + + +\H{map-parameters} \I{parameters, for Map}Map parameters + +These parameters are available from the \q{Custom...} option on the +\q{Type} menu. + +\dt \e{Width}, \e{Height} + +\dd Size of grid in squares. + +\dt \e{Regions} + +\dd Number of regions in the generated map. + +\dt \e{Difficulty} + +\dd In \q{Easy} mode, there should always be at least one region +whose colour can be determined trivially. In \q{Normal} mode, you +will have to use more complex logic to deduce the colour of some +regions. However, it will always be possible without having to +guess or backtrack. + + \A{licence} \I{MIT licence}\ii{Licence} This software is \i{copyright} 2004-2005 Simon Tatham.