logicpuzzle

A LaTeX style file for typesetting logic puzzles

User Tools

Site Tools


bridges

Differences

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

Link to this comparison view

bridges [2015/09/06 09:51] (current)
Line 1: Line 1:
 +<​markdown>​
 +Bridges
 +=======
  
 +The environment enables the user to typeset Bridges logic puzzles
 +(aka Brückenbau,​ Hashi, ...)  ​
 +Connect all the islands (circles) located in the grid by bridges. The bridges may only be routed horizontally and vertically. Islands may be connected by a maximum of two bridges. The bridges must neither overlap nor cross. They may also not be built over islands. The numbers in the islands indicate how many bridges originate from this island. All islands must be fully connected.
 +
 +![bridges puzzle](http://​i.imgur.com/​qZn6XhU.png)
 +
 +    \colorlet{LP@c@bridge}{Teal}
 +    \begin{center}
 +      \begin{bridges}
 +        \framepuzzle
 +        \bridgesrow{8}{{},​4,​{},​{},​{},​5,​{},​2}
 +        \bridgesrow{7}{{},​{},​1}
 +        \bridgesrow{5}{{},​{},​3,​{},​4}
 +        \bridgesrow{4}{{},​3,​{},​1,​{},​2}
 +        \bridgesrow{3}{{},​{},​{},​{},​{},​{},​{}}
 +        \bridgesrow{2}{{},​2,​{},​{},​5,​{},​{},​2}
 +      \end{bridges}
 +      \hspace{1.5cm}
 +      \begin{bridges}[grid=none]
 +        \framepuzzle
 +        \bridgesrow{8}{{},​4,​{},​{},​{},​5,​{},​2}
 +        \bridgesrow{7}{{},​{},​1}
 +        \bridgesrow{5}{{},​{},​3,​{},​4}
 +        \bridgesrow{4}{{},​3,​{},​1,​{},​2}
 +        \bridgesrow{3}{{},​{},​{},​{},​{},​{},​{}}
 +        \bridgesrow{2}{{},​2,​{},​{},​5,​{},​{},​2}
 +        \bridge[double]{\tikzpath{2}{4}{8,​8,​8,​8,​6,​6,​6,​6,​2,​2,​2,​2}}
 +        \bridge[double]{\tikzpath{2}{2}{6,​6,​6,​8,​8,​8,​4,​4}}
 +        \bridge{\tikzpath{2}{4}{6,​6}}
 +        \bridge{\tikzpath{3}{5}{8,​8}}
 +        \bridge{\tikzpath{5}{2}{6,​6,​6,​8,​8,​8,​8,​8,​8,​4,​4}}
 +      \end{bridges}
 +    \end{center}
 +
 +</​markdown>​
bridges.txt · Last modified: 2015/09/06 09:51 (external edit)