logicpuzzle

A LaTeX style file for typesetting logic puzzles

User Tools

Site Tools


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

\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}
minesweeper.txt · Last modified: 2015/09/06 09:51 (external edit)