Memory leak and type safety fixes from James H.
[sgt/puzzles] / puzzles.but
index 2c0fe87..9013006 100644 (file)
@@ -845,11 +845,11 @@ partial deductions about the \e{set} of squares a number could be in
 eventually have to make a guess, and then backtrack if it turns out
 to be wrong.
 
-Generating difficult puzzles is itself difficult: if you select
-\q{Intermediate} or \q{Advanced} difficulty, Solo may have to make
-many attempts at generating a puzzle before it finds one hard enough
-for you. Be prepared to wait, especially if you have also configured
-a large puzzle size.
+Generating difficult puzzles is itself difficult: if you select one
+of the higher difficulty levels, Solo may have to make many attempts
+at generating a puzzle before it finds one hard enough for you. Be
+prepared to wait, especially if you have also configured a large
+puzzle size.
 
 
 \C{mines} \i{Mines}
@@ -1476,7 +1476,7 @@ 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
+\H{slant-parameters} \I{parameters, for Slant}Slant parameters
 
 These parameters are available from the \q{Custom...} option on the
 \q{Type} menu.
@@ -1485,12 +1485,228 @@ These parameters are available from the \q{Custom...} option on the
 
 \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.
+
+
+\C{loopy} \i{Loopy}
+
+\cfg{winhelp-topic}{games.loopy}
+
+You are given a grid of dots. Your aim is to draw a single unbroken
+loop from dot to dot within the grid.
+
+Some of the square spaces between the dots contain numbers. These
+numbers indicate how many of the four edges of that square are part
+of the loop. The loop you draw must correctly satisfy all of these
+clues to be considered a correct solution.
+
+Credit for this puzzle goes to \i{Nikoli} \k{nikoli-loopy}.
+
+Loopy was contributed to this collection by Mike Pinna.
+
+\B{nikoli-loopy}
+\W{http://www.nikoli.co.jp/puzzles/3/index-e.htm}\cw{http://www.nikoli.co.jp/puzzles/3/index-e.htm}
+(beware of Flash)
+
+
+\H{loopy-controls} \i{Loopy controls}
+
+\IM{Loopy controls} controls, for Loopy
+\IM{Loopy controls} keys, for Loopy
+\IM{Loopy controls} shortcuts (keyboard), for Loopy
+
+Click the left mouse button between two dots to add a line segment
+connecting them. Click again to remove that line segment.
+
+If you are sure that a particular line segment is \e{not} part of
+the loop, you can click the right mouse button to add a small cross
+indicating this. Click again to remove the cross.
+
+
+\H{loopy-parameters} \I{parameters, for Loopy}Loopy 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{Recursion depth}
+
+\dd Determines how much guesswork and backtracking you will need to
+do to solve the puzzle. When this is set to zero (as it is for all
+of the \q{Easy} options in the menu), you should always be able to
+deduce the state of an edge without having to guess. If you increase
+it, you will have to guess more and more.
+
+\lcont{
+
+Setting a high value for this option is liable to consume a lot of
+CPU time and memory. Be warned!
+
+}
+
 
 \A{licence} \I{MIT licence}\ii{Licence}
 
 This software is \i{copyright} 2004-2005 Simon Tatham.
 
-Portions copyright Richard Boulton and James Harvey.
+Portions copyright Richard Boulton, James Harvey and Mike Pinna.
 
 Permission is hereby granted, free of charge, to any person
 obtaining a copy of this software and associated documentation files