I'm trying to use my limited knowledge of LaTeX to create a payoff matrix by hand. Here's my first try:
\begin{tabular}{cc|c|c|}
& & Player $Y$ & \\
& & $A$ & $B$ \\
\hline
Player $X$ & $A$ & $(x,y)$ & $(x,y)$ \\
\hline
& $B$ & $(x,y)$ & $(x,y)$ \\
\hline
\end{tabular}
However, what I've written isn't great, because
- The lines extend too far, instead of simply creating a box enclosing the payoffs
- How to center "Player X" and "Player Y" over the box?
- There's also a mysterious "missing $" error.
Are there any tips I'm missing that would fix these issues and make this into a great-looking payoff matrix? Thanks for your help!