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/pearl.html | 65 +++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 apps/plugins/puzzles/src/pearl.html (limited to 'apps/plugins/puzzles/src/pearl.html') diff --git a/apps/plugins/puzzles/src/pearl.html b/apps/plugins/puzzles/src/pearl.html new file mode 100644 index 0000000..c366ed3 --- /dev/null +++ b/apps/plugins/puzzles/src/pearl.html @@ -0,0 +1,65 @@ + + + + +Pearl + + + + + + + +

Previous | Contents | Index | Next

+

Chapter 36: Pearl

+

+You have a grid of squares. Your job is to draw lines between the centres of horizontally or vertically adjacent squares, so that the lines form a single closed loop. In the resulting grid, some of the squares that the loop passes through will contain corners, and some will be straight horizontal or vertical lines. (And some squares can be completely empty – the loop doesn't have to pass through every square.) +

+

+Some of the squares contain black and white circles, which are clues that the loop must satisfy. +

+

+A black circle in a square indicates that that square is a corner, but neither of the squares adjacent to it in the loop is also a corner. +

+

+A white circle indicates that the square is a straight edge, but at least one of the squares adjacent to it in the loop is a corner. +

+

+(In both cases, the clue only constrains the two squares adjacent in the loop, that is, the squares that the loop passes into after leaving the clue square. The squares that are only adjacent in the grid are not constrained.) +

+

+Credit for this puzzle goes to Nikoli, who call it ‘Masyu’. [19] +

+

+Thanks to James Harvey for assistance with the implementation. +

+

+[19] http://www.nikoli.co.jp/en/puzzles/masyu.html (beware of Flash) +

+

36.1 Pearl controls

+

+Click with the left button on a grid edge to draw a segment of the loop through that edge, or to remove a segment once it is drawn. +

+

+Drag with the left button through a series of squares to draw more than one segment of the loop in one go. Alternatively, drag over an existing part of the loop to undraw it, or to undraw part of it and then go in a different direction. +

+

+Click with the right button on a grid edge to mark it with a cross, indicating that you are sure the loop does not go through that edge. (For instance, if you have decided which of the squares adjacent to a white clue has to be a corner, but don't yet know which way the corner turns, you might mark the one way it can't go with a cross.) +

+

+Alternatively, use the cursor keys to move the cursor. Use the Enter key to begin and end keyboard ‘drag’ operations. Use the Space, Escape or Backspace keys to cancel the drag. Or, hold Control while dragging with the cursor keys to toggle segments as you move between squares. +

+

+Pressing Control-Shift-arrowkey or Shift-arrowkey simulates a left or right click, respectively, on the edge in the direction of the key. +

+

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

+

36.2 Pearl parameters

+

+These parameters are available from the ‘Custom...’ option on the ‘Type’ menu. +

+ +
+ -- cgit v1.1