From an earlier post, tabular environment: incrementing the headings, I learned some of the basics of incrementing a counter in an array. However, I don't know enough yet to set up a counter for the following prescribed rule filling in the table from the linked post. The rule is x is either 0 if the blue die is chosen or 1 if the red die and y is the number of dots on the chosen die. The die with greater value is chosen and the tie goes to red.
The code Werner supplied from the previous post is:
\documentclass{article}
\usepackage{array}
\newcounter{bluecol}\newcounter{redrow}
\newcommand{\insertblue}{%
\relax\ifnum\value{bluecol}>0 blue${}=\number\numexpr7-
\value{bluecol}$\addtocounter{bluecol}{-1}\fi}
\newcommand{\insertred}{%
\stepcounter{redrow}red${}= \theredrow$}
\begin{document}
\setcounter{redrow}{0}
\setcounter{bluecol}{6}
\begin{tabular}{|>{\insertred}c*{6}{|>{\insertblue}c}|}
\hline
\multicolumn{1}{|c|}{} &&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
\hline
\end{tabular}
\end{document}

