# logicpuzzle

A LaTeX style file for typesetting logic puzzles

### Sidebar

CTAN

Bitbucket

jkLaTeX

TeXdoku

——

The TeX community aggregator

Impressum / Datenschutzerklärung

masyu

# Masyu

The environment enables the user to typeset Bridges logic puzzles (aka Mashi, {White|Black} Pearls, ...)
Draw a line into the grid. The line can only run horizontally and vertically and must pass through all the circles. In cells with a black circle it have to turn in a 90 degree angle and go straight on for at least another cell. The line must go straight through empty circles, but turn left or right in at least one of the neighboring cells. There is no need to go through all cells.

\begin{masyu}
\framepuzzle
\setcells{1/2,3/3,4/1,4/2,4/5,5/4}{\MasyuW}
\masyucell{1}{4}{\MasyuB}
\end{masyu}
\hspace{1.5cm}
\begin{masyu}
\framepuzzle
\setcells{1/2,3/3,4/1,4/2,4/5,5/4}{\MasyuW}
\masyucell{1}{4}{\MasyuB}
\masyuline{\xtikzpath{1}{1}{8/3,6/2,8/1,6/2,2/2,4/3,2/1,6/3,2/1,4/4}}
\end{masyu}