Wiki

Clone wiki

logicpuzzle / Minesweeper

Minesweeper

The environment enables the user to typeset Minesweeper logic puzzles. Draw a mine in some cells of the grid. The number in a cell indicates how many of the eight neighboring cells contain a mine. A numbered cell does not contain a mine.

minesweeper puzzle

#!TeX
\begin{center}
  \begin{minesweeper}
    \framepuzzle
    \setrow{5}{{},1}
    \setrow{4}{{},{},3,3}
    \setrow{3}{3,{},4,2}
    \setrow{2}{{},{},{},{},0}
    \setrow{1}{{},2}
  \end{minesweeper}
  \hspace{1.5cm}
  \begin{minesweeper}
    \framepuzzle
    \setrow{5}{{},1,{},\Mine,\Mine}
    \setrow{4}{{},\Mine,3,3,\Mine}
    \setrow{3}{3,\Mine,4,2}
    \setrow{2}{{},\Mine,\Mine,{},0}
    \setrow{1}{{},2}
  \end{minesweeper}
\end{center}

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

Documentation (PDF)

Examples & Solutions (PDF)


[Home]

Updated