forked from ghewgill/puzzles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
guess.html
92 lines (90 loc) · 4 KB
/
guess.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!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>Guess</title>
<link rel="previous" href="flip.html">
<link rel="ToC" href="index.html">
<link rel="index" href="docindex.html">
<link rel="next" href="pegs.html">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<p><a href="flip.html">Previous</a> | <a href="index.html">Contents</a> | <a href="docindex.html">Index</a> | <a href="pegs.html">Next</a></p>
<h1><a name="C15"></a>Chapter 15: <a name="i0"></a>Guess</h1>
<p>
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.
</p>
<p>
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).
</p>
<p>
This game is also known (and marketed, by Hasbro, mainly) as a board game ‘<a name="i1"></a>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.
</p>
<p>
Guess was contributed to this collection by James Harvey.
</p>
<h2><a name="S15.1"></a>15.1 <a name="i2"></a>Guess controls</h2>
<p>
This game can be played with either the keyboard or the mouse.
</p>
<p>
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.
</p>
<p>
Right-clicking in the current guess adds a ‘hold’ marker; pegs that have hold markers will be automatically added to the next guess after marking.
</p>
<p>
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. ‘D’ or Backspace removes a peg, and ‘H’ adds a hold marker.
</p>
<p>
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 ‘current guess’ marker.
</p>
<p>
If you correctly position all the pegs the solution will be displayed below; if you run out of guesses (or select ‘Solve...’) the solution will also be revealed.
</p>
<p>
(All the actions described in <a href="common.html#S2.1">section 2.1</a> are also available.)
</p>
<h2><a name="S15.2"></a>15.2 <a name="i3"></a>Guess parameters</h2>
<p>
These parameters are available from the ‘Custom...’ option on the ‘Type’ menu. The default game matches the parameters for the board game ‘Mastermind’.
</p>
<dl><dt>
<em>Colours</em>
</dt>
<dd>
Number of colours the solution is chosen from; from 2 to 10 (more is harder).
</dd>
<dt>
<em>Pegs per guess</em>
</dt>
<dd>
Number of pegs per guess (more is harder).
</dd>
<dt>
<em>Guesses</em>
</dt>
<dd>
Number of guesses you have to find the solution in (fewer is harder).
</dd>
<dt>
<em>Allow blanks</em>
</dt>
<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.
<p>
Note that this doesn't allow blank pegs in the solution; if you really wanted that, use one extra colour.
</p>
</dd>
<dt>
<em>Allow duplicates</em>
</dt>
<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.
</dd>
</dl>
<hr><address></address></body>
</html>