# logicpuzzle

A LaTeX style file for typesetting logic puzzles

### Sidebar

CTAN

Bitbucket

jkLaTeX

TeXdoku

——

The TeX community aggregator

Impressum / Datenschutzerklärung

sunandmoon

# Sun and Moon

The environment enables the user to typeset 'Sun and Moon' logic puzzles (aka Sternenhaufen, Munraito, ...)
Enter exactly one star and one dark cloud in each row and each column of the grid, so that the planets are illuminated as specified. The stars shine horizontally or vertically arbitrarily far, but not through a planet or a dark cloud.

\begin{center}
\begin{sunandmoon}
\framepuzzle
\setrow{5}{{},{},{},{},\Moon}
\setrow{4}{{},{},\MoonTL}
\setrow{3}{\Moon}
\setrow{2}{{},\MoonR}
\setrow{1}{{},{},{},\MoonT}
\end{sunandmoon}
\hspace{1.5cm}
\begin{sunandmoon}
\framepuzzle
\setrow{5}{{},{},\Star,\Cloud,\Moon}
\setrow{4}{{},\Star,\MoonTL,{},\Cloud}
\setrow{3}{\Moon,\Cloud,{},{},\Star}
\setrow{2}{\Cloud,\MoonR,{},\Star}
\setrow{1}{\Star,{},\Cloud,\MoonT}
\end{sunandmoon}
\end{center}