# Masyu

> Draw one loop through cell centres that goes straight through white pearls and turns on black ones.

Also called: Pearl

Kind of puzzle: Lines

Web page: https://inkit.games/puzzles/masyu

## Origin

Masyu began in Nikoli's magazine as Pearl Necklace, with white pearls only, and Nikoli added the black pearls in 2000 before giving it the name Masyu.

## Credit

- Popularized by: Nikoli (2000)
- Source: [Nikoli](https://www.nikoli.co.jp/en/puzzles/masyu/)

## Rules

1. Draw one loop through the centres of cells. It doesn't have to visit every cell.
   - ✓ Right: One loop
2. White pearl: go straight through it, and turn in the cell just before or after it.
   - ✓ Right: Turns next to it
   - ✗ Wrong: Straight on both sides
3. Black pearl: turn on it, then go straight through the next cell on both sides.
   - ✓ Right: Turns, then straight
   - ✗ Wrong: Turns again too soon

## Worked example: Pearls

A 6×6 Masyu puzzle, with exactly one solution.

The givens, as inkit's puzzle engine writes them (cells are [row, column] from 0 at the top left):

```json
[{"at":"cell","cell":[3,4],"kind":"pearl","value":"white"},{"at":"cell","cell":[0,0],"kind":"pearl","value":"black"},{"at":"cell","cell":[4,1],"kind":"pearl","value":"white"},{"at":"cell","cell":[5,3],"kind":"pearl","value":"white"},{"at":"cell","cell":[3,3],"kind":"pearl","value":"white"},{"at":"cell","cell":[0,2],"kind":"pearl","value":"white"},{"at":"cell","cell":[2,4],"kind":"pearl","value":"white"},{"at":"cell","cell":[1,4],"kind":"pearl","value":"white"},{"at":"cell","cell":[3,1],"kind":"pearl","value":"white"}]
```

The solution is drawn on the web page: https://inkit.games/puzzles/masyu

Play it: https://inkit.games/g/masyu-1

## Playing on inkit

Drag from cell to cell to draw; drag back over a line to erase it.
