Missed a vital semicolon off the Cygwin version.c makefile fragment.
[sgt/puzzles] / puzzles.but
CommitLineData
e91825f8 1\title Simon Tatham's Portable Puzzle Collection
2
3\cfg{winhelp-filename}{puzzles.hlp}
4\cfg{winhelp-contents-titlepage}{Contents}
5
6\cfg{text-filename}{puzzles.txt}
7
fccfd04d 8\cfg{html-contents-filename}{index.html}
8709d5d9 9\cfg{html-template-filename}{%k.html}
10\cfg{html-index-filename}{docindex.html}
fccfd04d 11\cfg{html-leaf-level}{1}
12\cfg{html-contents-depth-0}{1}
13\cfg{html-contents-depth-1}{2}
14\cfg{html-leaf-contains-contents}{true}
15
e91825f8 16\cfg{info-filename}{puzzles.info}
17
18\cfg{ps-filename}{puzzles.ps}
19\cfg{pdf-filename}{puzzles.pdf}
20
1d8e8ad8 21\define{by} \u00D7{x}
22
e91825f8 23This is a collection of small one-player puzzle games.
24
25\copyright This manual is copyright 2004 Simon Tatham. All rights
26reserved. You may distribute this documentation under the MIT licence.
27See \k{licence} for the licence text in full.
28
8709d5d9 29\cfg{html-local-head}{<meta name="AppleTitle" content="Puzzles Help">}
e91825f8 30
8709d5d9 31\versionid $Id$
e91825f8 32
33\C{intro} Introduction
34
35I wrote this collection because I thought there should be more small
36desktop toys available: little games you can pop up in a window and
37play for two or three minutes while you take a break from whatever
8a771ea7 38else you were doing. And I was also annoyed that every time I found
39a good game on (say) \i{Unix}, it wasn't available the next time I
40was sitting at a \i{Windows} machine, or vice versa; so I arranged
41that everything in my personal puzzle collection will happily run on
42both, and have more recently done a port to Mac OS X as well. When I
43find (or perhaps invent) further puzzle games that I like, they'll
44be added to this collection and will immediately be available on
45both platforms. And if anyone feels like writing any other front
46ends - PocketPC, Mac OS pre-10, or whatever it might be - then all
47the games in this framework will immediately become available on
48another platform as well.
e91825f8 49
50The actual games in this collection were mostly not my invention; I
51saw them elsewhere, and rewrote them in a form that was more
52convenient for me. I do not claim credit, in general, for inventing
53the rules of any of these puzzles; all I claim is authorship of the
54code (or at least those parts of the code that weren't contributed
55by other people!).
56
57This collection is distributed under the \i{MIT licence} (see
58\k{licence}). This means that you can do pretty much anything you like
59with the game binaries or the code, except pretending you wrote them
60yourself, or suing me if anything goes wrong.
61
62The most recent versions, and \i{source code}, can be found at
63\I{website}\W{http://www.chiark.greenend.org.uk/~sgtatham/puzzles/}\cw{http://www.chiark.greenend.org.uk/~sgtatham/puzzles/}.
64
65Please report \I{feedback}\i{bugs} to
66\W{mailto:anakin@pobox.com}\cw{anakin@pobox.com}.
67You might find it helpful to read this article before reporting a bug:
68
69\W{http://www.chiark.greenend.org.uk/~sgtatham/bugs.html}\cw{http://www.chiark.greenend.org.uk/~sgtatham/bugs.html}
70
71\ii{Patches} are welcome. Especially if they provide a new front end
72(to make all these games run on another platform), or a new game.
73
74
75\C{common} \ii{Common features}
76
77This chapter describes features that are common to all the games.
78
79\H{common-actions} \I{controls}Common actions
80
81These actions are all available from the \I{Game menu}\q{Game} menu
82and via \I{keys}keyboard shortcuts, in addition to any game-specific
83actions.
84
bacaa96e 85(On Mac OS X, to conform with local user interface standards, these
3101ae26 86actions are situated on the \I{File menu}\q{File} and \I{Edit
bacaa96e 87menu}\q{Edit} menus instead.)
88
e91825f8 89\dt \ii\e{New game} (\q{N}, Ctrl+\q{N})
90
91\dd Starts a new game, with a random initial state.
92
93\dt \ii\e{Restart game} (\q{R})
94
95\dd Resets the current game to its initial state. Undo is lost.
96
97\dt \ii\e{Undo} (\q{U}, Ctrl+\q{Z}, Ctrl+\q{_})
98
99\dd Undoes a single move. (You can undo moves back to the start of the
100game.)
101
102\dt \ii\e{Redo} (Ctrl+\q{R})
103
104\dd Redoes a previous undone move.
105
bacaa96e 106\dt \ii\e{Copy}
107
108\dd Copies the current state of your game to the clipboard in text
109format, so that you can paste it into (say) an e-mail client or a
110web message board if you're discussing the game with someone else.
111(Not all games support this feature.)
112
2ac6d24e 113\dt \ii\e{Solve}
114
115\dd Transforms the puzzle instantly into its solved state. For some
116games (Cube) this feature is not supported at all because it is of
117no particular use. For other games (such as Pattern), the solved
118state can be used to give you information, if you can't see how a
119solution can exist at all or you want to know where you made a
120mistake. For still other games (such as Sixteen), automatic solution
121tells you nothing about how to \e{get} to the solution, but it does
122provide a useful way to get there quickly so that you can experiment
123with set-piece moves and transformations.
124
125\lcont{
126
127Some games (such as Solo) are capable of solving a game ID you have
128typed in from elsewhere. Other games (such as Rectangles) cannot
129solve a game ID they didn't invent themself, but when they did
130invent the game ID they know what the solution is already. Still
131other games (Pattern) can solve \e{some} external game IDs, but only
132if they aren't too difficult.
133
e8124727 134The \q{Solve} command adds the solved state to the end of the undo
135chain for the puzzle. In other words, if you want to go back to
136solving it yourself after seeing the answer, you can just press Undo.
137
2ac6d24e 138}
139
e91825f8 140\dt \I{exit}\ii\e{Quit} (\q{Q}, Ctrl+\q{Q})
141
142\dd Closes the application entirely.
143
144\H{common-id} Recreating games with the \ii{game ID}
145
146The \q{\i{Specific...}} option from the \I{Game menu}\q{Game} menu
bacaa96e 147(or the \q{File} menu, on Mac OS X) lets you see a short string (the
148\q{game ID}) that captures the initial state of the current game.
e91825f8 149
150The precise \I{ID format}format of the ID is specific to each game.
151It consists of two parts delimited by a colon (e.g., \c{c4x4:4F01,0});
152the first part encodes \i\e{parameters} (such as grid size), while the
153second part encodes a \i\e{seed}, which determines the \i{initial
154state} of the game within those parameters.
155
156You can specify a new ID (or just a seed) here. Pressing \q{OK} starts
157a new game with the specified ID (whether you changed it or not).
158Pressing \q{Cancel} returns to the current game.
159
160You can also use the game ID (or just the encoded parameters) as a
161\i{command line} argument; see \k{common-cmdline} for more detail.
162
163Game IDs are portable across platforms; you can use a game ID
164generated by the Windows version of a game on the Unix version, etc.
165
166\H{common-type} The \q{Type} menu
167
168The \I{Type menu}\q{Type} menu, if present, may contain a list of
169\i{preset} game settings. Selecting one of these will start a new
170random game with the parameters specified.
171
172The \q{Type} menu may also contain a \q{\i{Custom...}} option which
173allows you to fine-tune game \i{parameters}. The parameters available
174are specific to each game and are described in the following sections.
175
176\H{common-cmdline} Specifying game parameters on the \i{command line}
177
8a771ea7 178(This section does not apply to the Mac OS X version.)
179
e91825f8 180The games in this collection deliberately do not ever save
181information on to the computer they run on: they have no high score
182tables and no saved preferences. (This is because I expect at least
183some people to play them at work, and those people will probably
184appreciate leaving as little evidence as possible!)
185
186However, if you do want to arrange for one of these games to default
187to a particular set of parameters, you can specify them on the
188command line.
189
190The easiest way to do this is to set up the parameters you want
191using the \q{Type} menu (see \k{common-type}), and then to select
bacaa96e 192\q{Specific} from the \q{Game} or \q{File} menu (see \k{common-id}).
193The text in the \q{Game ID} box will be composed of two parts,
194separated by a colon. The first of these parts represents the game
195parameters (the size of the playing area, for example, and anything
196else you set using the \q{Type} menu).
e91825f8 197
198If you run the game with just that parameter text on the command
199line, it will start up with the settings you specified.
200
201For example: if you run Cube (see \k{cube}), select \q{Octahedron}
202from the \q{Type} menu, and then go to the game ID selection, you
203will see a string of the form \cq{o2x2:911A81,10}. Take only the
204part before the colon (\cq{o2x2}), and start Cube with that text on
205the command line: \cq{cube o2x2}.
206
207If you copy the \e{entire} game ID on to the command line, the game
208will start up in the specific game that was described. This is
209occasionally a more convenient way to start a particular game ID
210than by pasting it into the game ID selection box.
211
212\C{net} \i{Net}
213
214\cfg{winhelp-topic}{games.net}
215
216(\e{Note:} the \i{Windows} version of this game is called
217\i\cw{NETGAME.EXE} to avoid clashing with Windows's own \cw{NET.EXE}.)
218
219I originally saw this in the form of a Flash game called \i{FreeNet}
220\k{FreeNet}, written by Pavils Jurjans. The computer prepares a
221network by connecting up the centres of squares in a grid, and then
222shuffles the network by rotating every tile randomly. Your job is to
223rotate it all back into place. The successful solution will be an
224entirely connected network, with no closed loops. \#{Is it also true
225that a correct solution will not contain any cycles?} As a visual aid,
226all tiles which are connected to the one in the middle are
227highlighted.
228
229\B{FreeNet} \W{http://www.jurjans.lv/stuff/net/FreeNet.htm}\cw{http://www.jurjans.lv/stuff/net/FreeNet.htm}
230
231\H{net-controls} \i{Net controls}
232
233\IM{Net controls} controls, for Net
234\IM{Net controls} keys, for Net
235\IM{Net controls} shortcuts (keyboard), for Net
236
237This game can be played with either the keyboard or the mouse. The
238controls are:
239
240\dt \e{Select tile}: mouse pointer, arrow keys
241
242\dt \e{Rotate tile anticlockwise}: left mouse button, \q{A} key
243
244\dt \e{Rotate tile clockwise}: right mouse button, \q{D} key
245
246\dt \e{Lock (or unlock) tile}: middle mouse button, shift-click, \q{S} key
247
248\dd You can lock a tile once you're sure of its orientation. You can
249also unlock it again, but while it's locked you can't accidentally
250turn it.
251
cbb5549e 252\dt \e{Jumble tiles}: \q{J} key
253
254\dd This key turns all tiles that are not locked to random
255orientations.
256
e91825f8 257(All the actions described in \k{common-actions} are also available.)
258
259\H{net-params} \I{parameters, for Net}Net parameters
260
261These parameters are available from the \q{Custom...} option on the
262\q{Type} menu.
263
264\dt \e{Width}, \e{Height}
265
266\dd Size of grid in tiles.
267
268\dt \e{Walls wrap around}
269
270\dd If checked, flow can pass from the left edge to the right edge,
271and from top to bottom, and vice versa.
272
273\dt \e{Barrier probability}
274
275\dd A number between 0.0 and 1.0 controlling whether an immovable
276barrier is placed between two tiles to prevent flow between them (a
277higher number gives more barriers). Since barriers are immovable, they
278act as constraints on the solution (i.e., hints).
279
280\lcont{
281
282The grid generation in Net has been carefully arranged so that the
283barriers are independent of the rest of the grid. This means that if
284you change the \e{Barrier probability} parameter, and then re-enter
285the same game ID you were playing before (see \k{common-id}), you
286should see exactly the same starting grid, with the only change
287being the number of barriers. So if you're stuck on a particular
288grid and need a hint, you could start up another instance of Net,
289set up the same parameters but a higher barrier probability, and
290enter the game seed from the original Net window.
291
292}
293
294\C{cube} \i{Cube}
295
296\cfg{winhelp-topic}{games.cube}
297
298This is another one I originally saw as a web game. This one was a
299Java game \k{cube-java-game}, by Paul Scott. You have a grid of 16
300squares, six of which are blue; on one square rests a cube. Your move
301is to use the arrow keys to roll the cube through 90 degrees so that
302it moves to an adjacent square. If you roll the cube on to a blue
303square, the blue square is picked up on one face of the cube; if you
304roll a blue face of the cube on to a non-blue square, the blueness is
305put down again. (In general, whenever you roll the cube, the two faces
306that come into contact swap colours.) Your job is to get all six blue
307squares on to the six faces of the cube at the same time. Count your
308moves and try to do it in as few as possible.
309
310Unlike the original Java game, my version has an additional feature:
311once you've mastered the game with a cube rolling on a square grid,
312you can change to a triangular grid and roll any of a tetrahedron, an
313octahedron or an icosahedron.
314
315\B{cube-java-game} \W{http://www3.sympatico.ca/paulscott/cube/cube.htm}\cw{http://www3.sympatico.ca/paulscott/cube/cube.htm}
316
317\H{cube-controls} \i{Cube controls}
318
319\IM{Cube controls} controls, for Cube
320\IM{Cube controls} keys, for Cube
321\IM{Cube controls} shortcuts (keyboard), for Cube
322
323This game is played with the keyboard. The arrow keys are used to roll the
324cube (or other solid).
325
326On the triangular grids, the mapping of arrow keys to directions is
327more approximate. Vertical movement is disallowed where it doesn't
328make sense. The four keys surrounding the arrow keys on the numeric
329keypad (\q{7}, \q{9}, \q{1}, \q{3}) can be used for diagonal movement.
330
331(All the actions described in \k{common-actions} are also available.)
332
333\H{cube-params} \I{parameters, for Cube}Cube parameters
334
335These parameters are available from the \q{Custom...} option on the
336\q{Type} menu.
337
338\dt \e{Type of solid}
339
340\dd Selects the solid to roll (and hence the shape of the grid):
341tetrahedron, cube, octahedron, or icosahedron.
342
343\dt \e{Width / top}, \e{Height / bottom}
344
345\dd On a square grid, horizontal and vertical dimensions. On a
346triangular grid, the number of triangles on the top and bottom rows
347respectively.
348
349
350\C{fifteen} \i{Fifteen}
351
352\cfg{winhelp-topic}{games.fifteen}
353
1d8e8ad8 354The old ones are the best: this is the good old \q{\i{15-puzzle}}
355with sliding tiles. You have a 4\by\.4 square grid; 15 squares
356contain numbered tiles, and the sixteenth is empty. Your move is to
357choose a tile next to the empty space, and slide it into the space.
358The aim is to end up with the tiles in numerical order, with the
359space in the bottom right (so that the top row reads 1,2,3,4 and the
360bottom row reads 13,14,15,\e{space}).
e91825f8 361
362\H{fifteen-controls} \i{Fifteen controls}
363
364\IM{Fifteen controls} controls, for Fifteen
365\IM{Fifteen controls} keys, for Fifteen
366\IM{Fifteen controls} shortcuts (keyboard), for Fifteen
367
368This game can be controlled with the mouse or the keyboard.
369
370A left-click with the mouse in the row or column containing the empty
371space will move as many tiles as necessary to move the space to the
372mouse pointer.
373
374The arrow keys will move a tile adjacent to the space in the direction
375indicated (moving the space in the \e{opposite} direction).
376
377(All the actions described in \k{common-actions} are also available.)
378
379\H{fifteen-params} \I{parameters, for Fifteen}Fifteen parameters
380
381The only options available from the \q{Custom...} option on the \q{Type}
382menu are \e{Width} and \e{Height}, which are self-explanatory. (Once
383you've changed these, it's not a \q{15-puzzle} any more, of course!)
384
385
386\C{sixteen} \i{Sixteen}
387
388\cfg{winhelp-topic}{games.sixteen}
389
390Another sliding tile puzzle, visually similar to Fifteen (see
391\k{fifteen}) but with a different type of move. This time, there is no
392hole: all 16 squares on the grid contain numbered squares. Your move
393is to shift an entire row left or right, or shift an entire column up
394or down; every time you do that, the tile you shift off the grid
395re-appears at the other end of the same row, in the space you just
396vacated. To win, arrange the tiles into numerical order (1,2,3,4 on
397the top row, 13,14,15,16 on the bottom). When you've done that, try
398playing on different sizes of grid.
399
400I \e{might} have invented this game myself, though only by accident if
401so (and I'm sure other people have independently invented it). I
402thought I was imitating a screensaver I'd seen, but I have a feeling
403that the screensaver might actually have been a Fifteen-type puzzle
404rather than this slightly different kind. So this might be the one
405thing in my puzzle collection which represents creativity on my part
406rather than just engineering.
407
408\H{sixteen-controls} \I{controls, for Sixteen}Sixteen controls
409
410This game is played with the mouse. Left-clicking on an arrow will
411move the appropriate row or column in the direction indicated.
412Right-clicking will move it in the opposite direction.
413
414(All the actions described in \k{common-actions} are also available.)
415
416\H{sixteen-params} \I{parameters, for Sixteen}Sixteen parameters
417
81875211 418The parameters available from the \q{Custom...} option on the
419\q{Type} menu are:
420
421\b \e{Width} and \e{Height}, which are self-explanatory.
422
423\b You can ask for a limited shuffling operation to be performed on
424the grid. By default, Sixteen will shuffle the grid in such a way
425that any arrangement is about as probable as any other. You can
426override this by requesting a precise number of shuffling moves to
427be performed. Typically your aim is then to determine the precise
428set of shuffling moves and invert them exactly, so that you answer
429(say) a four-move shuffle with a four-move solution. Note that the
430more moves you ask for, the more likely it is that solutions shorter
431than the target length will turn out to be possible.
432
433\H{sixteen-cmdline} \I{command line, for Sixteen}Additional
434command-line configuration
435
436The limited shuffle parameter, described in \k{sixteen-params}, is
437not mentioned by default in the game ID (see \k{common-id}). So if
438you set your shuffling move count to (say) 4, and then you generate
439a normal 4\by\.4 grid, then the game ID will simply say
440\c{4x4:}\e{numbers}. This means that if you send the game ID to
441another player and they paste it into their copy of Sixteen, their
442game will not be automatically configured to use the same shuffle
443limit in any subsequent grids it generates. (I don't think the
444average person examining a single grid sent to them by another
445player would want their configuration modified to that extent.)
446
447If you are specifying a game ID or game parameters on the command
448line (see \k{common-cmdline}) and you do want to configure the
449shuffle limit, you can do it by suffixing the letter \cq{m} to the
450parameters, followed by the move count as a decimal number. For
451example, \cq{sixteen 4x4m4} will start up Sixteen with a problem
452guaranteed to be soluble in four moves or fewer.
e91825f8 453
454
9038fd11 455\C{twiddle} \i{Twiddle}
456
457\cfg{winhelp-topic}{games.twiddle}
458
459Twiddle is a tile-rearrangement puzzle, visually similar to Sixteen
460(see \k{sixteen}): you are given a grid of square tiles, each
461containing a number, and your aim is to arrange the numbers into
462ascending order.
463
464In basic Twiddle, your move is to rotate a square group of four
a3631c72 465tiles about their common centre. (Orientation is not significant in
466the basic puzzle, although you can select it.) On more advanced
467settings, you can rotate a larger square group of tiles.
9038fd11 468
469I first saw this type of puzzle in the GameCube game \q{Metroid
470Prime 2}. In the Main Gyro Chamber in that game, there is a puzzle
471you solve to unlock a door, which is a special case of Twiddle. I
472developed this game as a generalisation of that puzzle.
473
474\H{twiddle-controls} \I{controls, for Twiddle}Twiddle controls
475
476To play Twiddle, click the mouse in the centre of the square group
477you wish to rotate. In the basic mode, you rotate a 2\by\.2 square,
478which means you have to click at a corner point where four tiles
479meet.
480
481In more advanced modes you might be rotating 3\by\.3 or even more at
482a time; if the size of the square is odd then you simply click in
483the centre tile of the square you want to rotate.
484
485Clicking with the left mouse button rotates the group anticlockwise.
486Clicking with the right button rotates it clockwise.
487
488(All the actions described in \k{common-actions} are also available.)
489
490\H{twiddle-parameters} \I{parameters, for Twiddle}Twiddle parameters
491
492Twiddle provides several configuration options via the \q{Custom}
493option on the \q{Type} menu:
494
495\b You can configure the width and height of the puzzle grid.
496
497\b You can configure the size of square block that rotates at a time.
498
499\b You can ask for every square in the grid to be distinguishable
500(the default), or you can ask for a simplified puzzle in which there
501are groups of identical numbers. In the simplified puzzle your aim
502is just to arrange all the 1s into the first row, all the 2s into
503the second row, and so on.
504
a3631c72 505\b You can configure whether the orientation of tiles matters. If
d50832a3 506you ask for an orientable puzzle, each tile will have a triangle
507drawn in it. All the triangles must be pointing upwards to complete
508the puzzle.
a3631c72 509
81875211 510\b You can ask for a limited shuffling operation to be performed on
511the grid. By default, Twiddle will shuffle the grid so much that any
512arrangement is about as probable as any other. You can override this
513by requesting a precise number of shuffling moves to be performed.
514Typically your aim is then to determine the precise set of shuffling
515moves and invert them exactly, so that you answer (say) a four-move
516shuffle with a four-move solution. Note that the more moves you ask
517for, the more likely it is that solutions shorter than the target
518length will turn out to be possible.
519
520\H{twiddle-cmdline} \I{command line, for Twiddle}Additional
521command-line configuration
522
523The limited shuffle parameter, described in \k{twiddle-parameters},
524is not mentioned by default in the game ID (see \k{common-id}). So
525if you set your shuffling move count to (say) 4, and then you
526generate a normal 3\by\.3 grid, then the game ID will simply say
527\c{3x3n2:}\e{numbers}. This means that if you send the game ID to
528another player and they paste it into their copy of Twiddle, their
529game will not be automatically configured to use the same shuffle
530limit in any subsequent grids it generates. (I don't think the
531average person examining a single grid sent to them by another
532player would want their configuration modified to that extent.)
533
534If you are specifying a game ID or game parameters on the command
535line (see \k{common-cmdline}) and you do want to configure the
536shuffle limit, you can do it by suffixing the letter \cq{m} to the
537parameters, followed by the move count as a decimal number. For
538example, \cq{twiddle 3x3n2m4} will start up Twiddle with a problem
539guaranteed to be soluble in four moves or fewer.
9038fd11 540
e91825f8 541\C{rectangles} \i{Rectangles}
542
543\cfg{winhelp-topic}{games.rectangles}
544
545You have a grid of squares, with numbers written in some (but not all)
546of the squares. Your task is to subdivide the grid into rectangles of
547various sizes, such that (a) every rectangle contains exactly one
548numbered square, and (b) the area of each rectangle is equal to the
549number written in its numbered square.
550
551Credit for this game goes to the Japanese puzzle magazine \i{Nikoli}
6ae37301 552\k{nikoli-rect}; I've also seen a Palm implementation at \i{Puzzle Palace}
553\k{puzzle-palace-rect}. Unlike Puzzle Palace's implementation, my version
e91825f8 554automatically generates random grids of any size you like. The quality
555of puzzle design is therefore not quite as good as hand-crafted
556puzzles would be (in particular, a unique solution cannot be
557guaranteed), but on the plus side you get an inexhaustible supply of
558puzzles tailored to your own specification.
559
6ae37301 560\B{nikoli-rect} \W{http://www.nikoli.co.jp/puzzles/7/index_text-e.htm}\cw{http://www.nikoli.co.jp/puzzles/7/index_text-e.htm}
e91825f8 561
6ae37301 562\B{puzzle-palace-rect} \W{http://www.puzzle.gr.jp/puzzle/sikaku/palm/index.html.en}\cw{http://www.puzzle.gr.jp/puzzle/sikaku/palm/index.html.en}
e91825f8 563
564\H{rectangles-controls} \I{controls, for Rectangles}Rectangles controls
565
566This game is played with the mouse.
567
568Left-click any edge to toggle it on or off, or click and drag to draw
569an entire rectangle (or line) on the grid in one go (removing any
570existing edges within that rectangle).
571
572When a rectangle of the correct size is completed, it will be shaded.
573
574(All the actions described in \k{common-actions} are also available.)
575
576\H{rectangles-params} \I{parameters, for Rectangles}Rectangles parameters
577
aea3ed9a 578The \q{Custom...} option on the \q{Type} menu offers you \e{Width}
579and \e{Height} parameters, which are self-explanatory.
580
581\q{Expansion factor} is a mechanism for changing the type of grids
582generated by the program. Some people prefer a grid containing a few
583large rectangles to one containing many small ones. So you can ask
584Rectangles to essentially generate a \e{smaller} grid than the size
585you specified, and then to expand it by adding rows and columns.
586
587The default expansion factor of zero means that Rectangles will
588simply generate a grid of the size you ask for, and do nothing
589further. If you set an expansion factor of (say) 0.5, it means that
590each dimension of the grid will be expanded to half again as big
591after generation. In other words, the initial grid will be 2/3 the
592size in each dimension, and will be expanded to its full size
593without adding any more rectangles.
594
4a03dbb4 595Setting an expansion factor of around 0.5 tends to make the game
596more difficult, and also (in my experience) rewards a less deductive
597and more intuitive playing style. If you set it \e{too} high,
598though, the game simply cannot generate more than a few rectangles
599to cover the entire grid, and the game becomes trivial.
aea3ed9a 600
601\H{rectangles-cmdline} \I{command line, for Rectangles}Additional
602command-line configuration
603
604The expansion factor parameter, described in \k{rectangles-params},
605is not mentioned by default in the game ID (see \k{common-id}). So
606if you set your expansion factor to (say) 0.75, and then you
1d8e8ad8 607generate an 11\by\.11 grid, then the game ID will simply say
aea3ed9a 608\c{11x11:}\e{numbers}. This means that if you send the game ID to
609another player and they paste it into their copy of Rectangles,
610their game will not be automatically configured to use the same
611expansion factor in any subsequent grids it generates. (I don't
612think the average person examining a single grid sent to them by
613another player would want their configuration modified to that
614extent.)
615
616If you are specifying a game ID or game parameters on the command
617line (see \k{common-cmdline}) and you do want to configure the
618expansion factor, you can do it by suffixing the letter \cq{e} to
619the parameters, followed by the expansion factor as a decimal
620number. For example:
621
622\b \cq{rect 11x11e0.75} starts Rectangles with a grid size of
62311\u00d7{x}11 and an expansion factor of 0.75.
624
625\b \cq{rect 11x11e0.75:g11c6e5e4a2_4e9c3b3d3b5g2b6c4k4g30a8n3j1g6a2}
626starts Rectangles with a grid size of 11\u00d7{x}11, an expansion
627factor of 0.75, \e{and} a specific game selected.
e91825f8 628
6ae37301 629
e91825f8 630\C{netslide} \i{Netslide}
631
632\cfg{winhelp-topic}{games.netslide}
633
634This game was submitted by Richard Boulton. It combines the grid
635generation of Net (see \k{net}) with the movement of Sixteen (see
636\k{sixteen}): you have a Net grid, but instead of rotating tiles back
637into place you have to slide them into place by moving a whole row at
638a time.
639
e91825f8 640As in Sixteen, \I{controls, for Netslide}control is with the mouse.
641See \k{sixteen-controls}.
642
643\I{parameters, for Netslide}Game parameters are the same as for Net
644(see \k{net-params}).
645
6ae37301 646
b6b0369e 647\C{pattern} \i{Pattern}
648
649\cfg{winhelp-topic}{games.pattern}
650
651You have a grid of squares, which must all be filled in either black
652or white. Beside each row of the grid are listed the lengths of the
653runs of black squares on that row; above each column are listed the
654lengths of the runs of black squares in that column. Your aim is to
655fill in the entire grid black or white.
656
657I first saw this puzzle form around 1995, under the name
2e1e03ff 658\q{\i{nonograms}}. I've seen it in various places since then, under
b6b0369e 659different names.
660
661Normally, puzzles of this type turn out to be a meaningful picture
662of something once you've solved them. However, since this version
663generates the puzzles automatically, they will just look like random
664groupings of squares. (One user has suggested that this is actually
665a \e{good} thing, since it prevents you from guessing the colour of
666squares based on the picture, and forces you to use logic instead.)
667The advantage, though, is that you never run out of them.
668
2e1e03ff 669\H{pattern-controls} \I{controls, for Pattern}Pattern controls
b6b0369e 670
671This game is played with the mouse.
672
673Left-click in a square to colour it black. Right-click to colour it
674white. If you make a mistake, you can middle-click, or hold down
675Shift while clicking with any button, to colour the square in the
676default grey (meaning \q{undecided}) again.
677
678You can click and drag with the left or right mouse button to colour
679a vertical or horizontal line of squares black or white at a time
680(respectively). If you click and drag with the middle button, or
681with Shift held down, you can colour a whole rectangle of squares
682grey.
683
2e1e03ff 684(All the actions described in \k{common-actions} are also available.)
685
b6b0369e 686\H{pattern-parameters} \I{parameters, for Pattern}Pattern parameters
687
688The only options available from the \q{Custom...} option on the \q{Type}
689menu are \e{Width} and \e{Height}, which are self-explanatory.
e91825f8 690
6ae37301 691
1d8e8ad8 692\C{solo} \i{Solo}
693
694\cfg{winhelp-topic}{games.solo}
695
696You have a square grid, which is divided into square or rectangular
697blocks. Each square must be filled in with a digit from 1 to the
698size of the grid, in such a way that
699
700\b every row contains only one occurrence of each digit
701
702\b every column contains only one occurrence of each digit
703
704\b every block contains only one occurrence of each digit.
705
706You are given some of the numbers as clues; your aim is to place the
707rest of the numbers correctly.
708
709The default puzzle size is 3\by\.3 (a 9\by\.9 actual grid, divided
710into nine 3\by\.3 blocks). You can also select sizes with
711rectangular blocks instead of square ones, such as 2\by\.3 (a
7126\by\.6 grid divided into six 3\by\.2 blocks).
713
714If you select a puzzle size which requires more than 9 digits, the
715additional digits will be letters of the alphabet. For example, if
716you select 3\by\.4 then the digits which go in your grid will be 1
717to 9, plus \cq{a}, \cq{b} and \cq{c}.
718
6ae37301 719I first saw this puzzle in \i{Nikoli} \k{nikoli-solo}, although it's also
1d8e8ad8 720been popularised by various newspapers under the name \q{Sudoku} or
721\q{Su Doku}.
722
6ae37301 723\B{nikoli-solo} \W{http://www.nikoli.co.jp/puzzles/1/index_text-e.htm}\cw{http://www.nikoli.co.jp/puzzles/1/index_text-e.htm}
724
1d8e8ad8 725\H{solo-controls} \I{controls, for Solo}Solo controls
726
727To play Solo, simply click the mouse in any empty square and then
728type a digit or letter on the keyboard to fill that square. If you
729make a mistake, click the mouse in the incorrect square and press
730Space to clear it again (or use the Undo feature).
731
732(All the actions described in \k{common-actions} are also available.)
733
734\H{solo-parameters} \I{parameters, for Solo}Solo parameters
735
736Solo allows you to configure two separate dimensions of the puzzle
6ae37301 737grid on the \q{Type} menu: the number of columns, and the number of
738rows, into which the main grid is divided. (The size of a block is
739the inverse of this: for example, if you select 2 columns and 3 rows,
740each actual block will have 3 columns and 2 rows.)
1d8e8ad8 741
ef57b17d 742You can also configure the type of symmetry shown in the generated
743puzzles. More symmetry makes the puzzles look prettier but may also
744make them easier, since the symmetry constraints can force more
745clues than necessary to be present. Completely asymmetric puzzles
746have the freedom to contain as few clues as possible.
747
7c568a48 748Finally, you can configure the difficulty of the generated puzzles.
749Difficulty levels are judged by the complexity of the techniques of
750deduction required to solve the puzzle: each level requires a mode
751of reasoning which was not necessary in the previous one. In
752particular, on difficulty levels \q{Trivial} and \q{Basic} there
753will be a square you can fill in with a single number at all times,
754whereas at \q{Intermediate} level and beyond you will have to make
755partial deductions about the \e{set} of squares a number could be in
de60d8bd 756(or the set of numbers that could be in a square). At
757\q{Unreasonable} level, even this is not enough, and you will
758eventually have to make a guess, and then backtrack if it turns out
759to be wrong.
7c568a48 760
761Generating difficult puzzles is itself difficult: if you select
762\q{Intermediate} or \q{Advanced} difficulty, Solo may have to make
763many attempts at generating a puzzle before it finds one hard enough
764for you. Be prepared to wait, especially if you have also configured
765a large puzzle size.
766
ef57b17d 767\H{solo-cmdline} \I{command line, for Solo}Additional command-line
768configuration
769
7c568a48 770The symmetry and difficulty parameters (described in
771\k{solo-parameters}) are not mentioned by default in the game ID
772(see \k{common-id}). So if (for example) you set your symmetry to
7734-way rotational and your difficulty to \q{Advanced}, and then you
774generate a 3\by\.4 grid, then the game ID will simply say
775\c{3x4:}\e{numbers}. This means that if you send the game ID to
776another player and they paste it into their copy of Solo, their game
777will not be automatically configured to use the same symmetry and
778difficulty settings in any subsequent grids it generates. (I don't
779think the average person examining a single grid sent to them by
780another player would want their configuration modified to that
781extent.)
ef57b17d 782
783If you are specifying a game ID or game parameters on the command
784line (see \k{common-cmdline}) and you do want to configure the
785symmetry, you can do it by suffixing additional text to the
786parameters:
787
788\b \cq{m4} for 4-way mirror symmetry
789
790\b \cq{r4} for 4-way rotational symmetry
791
792\b \cq{r2} for 2-way rotational symmetry
793
794\b \cq{a} for no symmetry at all (stands for \q{asymmetric})
795
7c568a48 796\b \cq{dt} for Trivial difficulty level
797
798\b \cq{db} for Basic difficulty level
799
800\b \cq{di} for Intermediate difficulty level
801
802\b \cq{da} for Advanced difficulty level
803
de60d8bd 804\b \cq{du} for Unreasonable difficulty level
805
ef57b17d 806So, for example, you can make Solo generate asymmetric 3x4 grids by
807running \cq{solo 3x4a}, or 4-way rotationally symmetric 2x3 grids by
7c568a48 808running \cq{solo 2x3r4}, or \q{Advanced}-level 2x3 grids by running
809\cq{solo 2x3da}.
ef57b17d 810
811
e91825f8 812\A{licence} \I{MIT licence}\ii{Licence}
813
8a771ea7 814This software is \i{copyright} 2004-2005 Simon Tatham.
e91825f8 815
816Portions copyright Richard Boulton.
817
818Permission is hereby granted, free of charge, to any person
819obtaining a copy of this software and associated documentation files
820(the "Software"), to deal in the Software without restriction,
821including without limitation the rights to use, copy, modify, merge,
822publish, distribute, sublicense, and/or sell copies of the Software,
823and to permit persons to whom the Software is furnished to do so,
824subject to the following conditions:
825
826The above copyright notice and this permission notice shall be
827included in all copies or substantial portions of the Software.
828
829THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
830EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
831MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
832NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
833BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
834ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
835CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
836SOFTWARE.
837
838\IM{specific...} Specific..., menu option
839\IM{custom...} Custom..., menu option
840
841\IM{game ID} game ID
842\IM{game ID} ID, game
843\IM{ID format} ID format
844\IM{ID format} format, ID
845\IM{ID format} game ID, format
846
847\IM{keys} keys
848\IM{keys} shortcuts (keyboard)
849
850\IM{initial state} initial state
851\IM{initial state} state, initial
852
853\IM{MIT licence} MIT licence
854\IM{MIT licence} licence, MIT