Clone wiki

logicpuzzle / ChaosSudoku

Chaos Sudoku

The environment enables the user to typeset Chaos Sudoku logic puzzles Fill the cells of an area with numbers from 1 to N of the N*N grid. Each number can appear only once - in each area, column, row or diagonal if indicated. Here’s a little self-explanatory example:

Chaos Sudoku

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

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

Documentation (PDF)(Wiki)

Examples & Solutions (PDF)


[Home]

Updated