logicpuzzle

A LaTeX style file for typesetting logic puzzles

User Tools

Site Tools


tentsandtrees

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tentsandtrees [2015/09/06 09:52] (current)
Line 1: Line 1:
 +<​markdown>​
 +Tents and Trees
 +===============
  
 +The environment enables the user to typeset Tents and Trees logic puzzles (aka Zeltlager, Zeltplatz, Camping, ...). Draw tents in the grid. Next to each tree, a tent must be entered in a horizontally or vertically adjacent cell, which is associated with this tree. The numbers next to the grid indicate the quantity of tents in each row or column. No tent can stand directly next to another one, not even diagonally. Here’s a little self-explanatory example:
 +
 +![Tents and Trees](http://​i.imgur.com/​BQAPa6w.png)
 +
 +    \begin{center}
 +      \begin{tentsandtrees}
 +        \framepuzzle
 +        \tentH{1,​2,​1,​1,​2}
 +        \tentV{2,​0,​2,​0,​3}
 +        \setrow{4}{\Tree,​{},​\Tree,​\Tree,​\Tree}
 +        \setrow{2}{{},​\Tree}
 +        \setrow{1}{\Tree,​{},​{},​\Tree}
 +      \end{tentsandtrees}
 +      \hspace{1.5cm}
 +      \begin{tentsandtrees}
 +        \framepuzzle
 +        \tentH{1,​2,​1,​1,​2}
 +        \tentV{2,​0,​2,​0,​3}
 +        \setrow{5}{\Tent,​{},​\Tent,​{},​\Tent,​}
 +        \setrow{4}{\Tree,​{},​\Tree,​\Tree,​\Tree}
 +        \setrow{3}{{},​\Tent,​{},​\Tent}
 +        \setrow{2}{{},​\Tree}
 +        \setrow{1}{\Tree,​\Tent,​{},​\Tree,​\Tent}
 +      \end{tentsandtrees}
 +    \end{center}
 +
 +</​markdown>​
tentsandtrees.txt · Last modified: 2015/09/06 09:52 (external edit)