# Hakyuu

The environment enables the user to typeset Hakyuu logic puzzles (aka Seismic, Ripple Effect, ...). Fill the cells of an area with numbers from 1 to SIZE of the area. If there are two cells with the same number N in a row or a column, there must be at least N cells between those two cells. Here’s a little self-explanatory example:

\begin{center}
\begin{hakyuu}
\hakyuucell{1}{5}{2}
\hakyuucell{3}{5}{6}
\hakyuucell{4}{5}{5}
\hakyuucell{4}{4}{4}
\hakyuucell{1}{3}{3}
\hakyuucell{2}{2}{2}
\hakyuucell{5}{2}{5}
\hakyuucell{4}{1}{1}
\begin{puzzlebackground}
\fillarea{Wheat}{(1,1)--(1,4)--(2,4)--(2,1)--(1,1)}
\fillarea{HotPink!30}{(1,4)--(1,6)--(6,6)--(6,5)--(3,5)--(3,4)--(1,4)}
\fillarea{GreenYellow}{(2,4)--(3,4)--(3,5)--(5,5)--(5,4)--(4,4)--(4,3)--(2,3)--(2,4)}
\fillarea{LightBlue}{(5,5)--(6,5)--(6,3)--(4,3)--(4,4)--(5,4)--(5,5)}
\fillarea{LightSalmon!50}{(2,2)--(2,3)--(5,3)--(5,2)--(2,2)}
\fillarea{LightYellow}{(2,1)--(2,2)--(5,2)--(5,3)--(6,3)--(6,1)--(2,1)}
\end{puzzlebackground}
\end{hakyuu}
\hspace{1,5cm}
\begin{hakyuu}
\setrow{5}{2,3,6,5,4}
\setrow{4}{1,7,3,4,2}
\setrow{3}{3,1,2,1,3}
\setrow{2}{1,2,1,3,5}
\setrow{1}{2,3,4,1,2}
\begin{puzzlebackground}
\fillarea{Wheat}{(1,1)--(1,4)--(2,4)--(2,1)--(1,1)}
\fillarea{HotPink!30}{(1,4)--(1,6)--(6,6)--(6,5)--(3,5)--(3,4)--(1,4)}
\fillarea{GreenYellow}{(2,4)--(3,4)--(3,5)--(5,5)--(5,4)--(4,4)--(4,3)--(2,3)--(2,4)}
\fillarea{LightBlue}{(5,5)--(6,5)--(6,3)--(4,3)--(4,4)--(5,4)--(5,5)}
\fillarea{LightSalmon!50}{(2,2)--(2,3)--(5,3)--(5,2)--(2,2)}
\fillarea{LightYellow}{(2,1)--(2,2)--(5,2)--(5,3)--(6,3)--(6,1)--(2,1)}
\end{puzzlebackground}
\end{hakyuu}
\end{center}

You will find the current release in the Downloads tab and on CTAN.

Documentation (PDF)(Wiki)

Examples & Solutions (PDF)

[Home]

Updated