2

I'm writing an article about Conway's Game of Life, and I'm using the Springer LNCS template.

In my article, I must sometimes show some game of life patterns, for example the following:

example_of_pattern

To generate such pattern, I used the Tikz package. The code (without other formatting commands) is the following:

\begin{tikzpicture}
  \fill[black] (1,4) rectangle (3,6);
  \fill[black] (11,3) rectangle (12,6);
  \fill[black] (12,2) rectangle (13,3);
  \fill[black] (12,6) rectangle (13,7);
  \fill[black] (13,1) rectangle (15,2);
  \fill[black] (13,7) rectangle (15,8);
  \fill[black] (15,4) rectangle (16,5);
  \fill[black] (16,2) rectangle (17,3);
  \fill[black] (16,6) rectangle (17,7);
  \fill[black] (17,3) rectangle (18,6);
  \fill[black] (18,4) rectangle (19,5);
  \fill[black] (21,5) rectangle (23,8);
  \fill[black] (23,4) rectangle (24,5);
  \fill[black] (23,8) rectangle (24,9);
  \fill[black] (25,3) rectangle (26,5);
  \fill[black] (25,8) rectangle (26,10);
  \fill[black] (35,6) rectangle (37,8);
  \draw[step=1cm,gray,thick] (0,0) grid (38,11);
\end{tikzpicture}

As you can see, this is pretty bad, expecially as I must now produce dozen of such patterns, and manually specifying the coordinates of every black cells is... well, not viable.

The question is: is there a way to achieve the same result as above, but using (for example) a matrix-style input?

What I mean is something like:

\sort-of-matrix-command {
    W & W & W & W & W & B \\
    W & B & W & W & W & W \\
    B & W & B & B & W & W \\
    W & W & B & B & B & W \\
    B & B & W & W & W & W \\
    W & W & W & W & W & W \\
}

where "W" or "B" stand for white cell and black cell respectively.

If it is not possible, any other way which is faster than the one I'm currently using is well accepted.

Thank you in advance!