-
Notifications
You must be signed in to change notification settings - Fork 24
/
flood.html
65 lines (63 loc) · 3.35 KB
/
flood.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Flood</title>
<link rel="previous" href="unruly.html">
<link rel="ToC" href="index.html">
<link rel="index" href="docindex.html">
<link rel="next" href="tracks.html">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<p><a href="unruly.html">Previous</a> | <a href="index.html">Contents</a> | <a href="docindex.html">Index</a> | <a href="tracks.html">Next</a></p>
<h1><a name="C39"></a>Chapter 39: <a name="i0"></a>Flood</h1>
<p>
You are given a grid of squares, coloured at random in multiple colours. In each move, you can flood-fill the top left square in a colour of your choice (i.e. every square reachable from the starting square by an orthogonally connected path of squares all the same colour will be filled in the new colour). As you do this, more and more of the grid becomes connected to the starting square.
</p>
<p>
Your aim is to make the whole grid the same colour, in as few moves as possible. The game will set a limit on the number of moves, based on running its own internal solver. You win if you can make the whole grid the same colour in that many moves or fewer.
</p>
<p>
I saw this game (with a fixed grid size, fixed number of colours, and fixed move limit) at <a href="http://floodit.appspot.com"><code>floodit.appspot.com</code></a>.
</p>
<h2><a name="S39.1"></a>39.1 <a name="i1"></a>Flood controls</h2>
<p>
To play Flood, click the mouse in a square. The top left corner and everything connected to it will be flood-filled with the colour of the square you clicked. Clicking a square the same colour as the top left corner has no effect, and therefore does not count as a move.
</p>
<p>
You can also use the cursor keys to move a cursor (outline black square) around the grid. Pressing the return key will fill the top left corner in the colour of the square under the cursor.
</p>
<p>
(All the actions described in <a href="common.html#S2.1">section 2.1</a> are also available.)
</p>
<h2><a name="S39.2"></a>39.2 <a name="i2"></a>Flood parameters</h2>
<p>
These parameters are available from the ‘Custom...’ option on the ‘Type’ menu.
</p>
<dl><dt>
<em>Width</em>, <em>Height</em>
</dt>
<dd>
Size of the grid, in squares.
</dd>
<dt>
<em>Colours</em>
</dt>
<dd>
Number of colours used to fill the grid. Must be at least 3 (with two colours there would only be one legal move at any stage, hence no choice to make at all), and at most 10.
</dd>
<dt>
<em>Extra moves permitted</em>
</dt>
<dd>
Controls the difficulty of the puzzle, by increasing the move limit. In each new grid, Flood will run an internal solver to generate its own solution, and then the value in this field will be added to the length of Flood's solution to generate the game's move limit. So a value of 0 requires you to be just as efficient as Flood's automated solver, and a larger value makes it easier.
<p>
(Note that Flood's internal solver will not necessarily find the shortest possible solution, though I believe it's pretty close. For a real challenge, set this value to 0 and then try to solve a grid in <em>strictly fewer</em> moves than the limit you're given!)
</p>
</dd>
</dl>
<hr><address></address></body>
</html>