From 881746789a489fad85aae8317555f73dbe261556 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Sat, 29 Apr 2017 18:21:56 -0400 Subject: puzzles: refactor and resync with upstream This brings puzzles up-to-date with upstream revision 2d333750272c3967cfd5cd3677572cddeaad5932, though certain changes made by me, including cursor-only Untangle and some compilation fixes remain. Upstream code has been moved to its separate subdirectory and future syncs can be done by simply copying over the new sources. Change-Id: Ia6506ca5f78c3627165ea6791d38db414ace0804 --- apps/plugins/puzzles/src/guess.html | 94 +++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 apps/plugins/puzzles/src/guess.html (limited to 'apps/plugins/puzzles/src/guess.html') diff --git a/apps/plugins/puzzles/src/guess.html b/apps/plugins/puzzles/src/guess.html new file mode 100644 index 0000000000..b530f71a75 --- /dev/null +++ b/apps/plugins/puzzles/src/guess.html @@ -0,0 +1,94 @@ + + + + +Guess + + + + + + + +

Previous | Contents | Index | Next

+

Chapter 15: 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 ‘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. +

+

15.1 Guess controls

+

+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 ‘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. ‘D’ or Backspace removes a peg, and Space adds a hold marker. +

+

+Pressing ‘h’ or ‘?’ will fill the current guess with a suggested guess. Using this is not recommended for 10 or more pegs as it is slow. +

+

+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. +

+

+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. +

+

+(All the actions described in section 2.1 are also available.) +

+

15.2 Guess parameters

+

+These parameters are available from the ‘Custom...’ option on the ‘Type’ menu. The default game matches the parameters for the board game ‘Mastermind’. +

+
+Colours +
+
+Number of colours the solution is chosen from; from 2 to 10 (more is harder). +
+
+Pegs per guess +
+
+Number of pegs per guess (more is harder). +
+
+Guesses +
+
+Number of guesses you have to find the solution in (fewer is harder). +
+
+Allow blanks +
+
+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. +

+ +
+
+Allow duplicates +
+
+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. +
+
+ +
+ -- cgit v1.2.3