1. Josef Kleber
  2. logicpuzzle

Wiki

Clone wiki

logicpuzzle / Battleship

Battleship

The environment enables the user to typeset Battleship logic puzzles (aka Bimaru, Marinespiel, Batalla Naval, ...). You have to find the positions of ships in a grid. Numbers next to the grid reveal the number of ship segments in the respective columns and rows.

battleship game

\begin{battleship}
  \placesegment{4}{1}{\ShipR}
  \shipH{4,1,2,2,2}
  \shipV{3,1,4,0,3}
  \shipbox{3,3,2,2,1}
\end{battleship}
\hspace{1cm}
\begin{battleship}
  \placeship{V}{1}{1}{3}
  \placeship{H}{1}{5}{2}
  \placeship{H}{3}{1}{2}
  \placeship{H}{3}{3}{3}
  \placeship{H}{5}{5}{1}
  \shipH{4,1,2,2,2}
  \shipV{3,1,4,0,3}
\end{battleship}

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

Documentation (PDF)(Wiki)

Examples & Solutions (PDF)

classicsheet.pdf for playing the classic Battleship on paper

classicsheet-fancy.pdf fancy version with colors


[Home]

Updated