I have some code to automatically draw the grid for a polyomino (a shape constructed from edge-to-edge connected squares) based on the user input of its binary matrix. The binary matrix is for the bounding rectangle of the polyomino where 1's represent filled squares of the polyomino, while 0's represent empty squares (i.e., squares not belonging to the polyomino). I would like to draw the boundary of the polyomino with lines that are thicker than the grid lines. Ideally I would like the line thickness of both grid lines and boundary lines to be adjustable (the grid line width already is). See the code below and corresponding figure.
\documentclass{article}
\usepackage{tikz}
\usepackage{xcolor}
\newcommand{\drawPolyomino}[3]{
\begin{tikzpicture}[scale=#2]
% Draw the squares
\foreach[count=\jR from 0] \row in {#1} {
\pgfmathtruncatemacro\j{abs(\jR - 3)}
\foreach[count=\i from 0] \cell in \row {
\ifnum\cell=1
\draw[#3] (\i, \j) rectangle ++(1,1);
\fi
}
}
\end{tikzpicture}
}
\begin{document}
\begin{figure}
\centering
\drawPolyomino{{0,1,0,0,0},{1,1,1,1,0},{0,0,1,1,1},{0,0,0,1,0}}{1.0}{thin}
% Input the polyomino, followed by arguments for scale and line width respectively.
\caption{A polyomino constructed from an input binary matrix.}
\end{figure}
\end{document}



