\documentclass[12pt]{article}
% example usage bimatrixgame macro
% 27 Mar 2021
% 5 Nov 2012
\usepackage{pict2e}
\usepackage{color}
\usepackage{bimatrixgame}

\oddsidemargin=.46cm    
\textwidth=15cm
\textheight=232mm
\topmargin=-.2cm       

\usepackage{mathptmx}  % italics fonts text and maths
\pagestyle{empty}  % no page numbers
\parindent0pt
\begin{document}

{\Large Illustration of the \verb@\bimatrixgame@  macro}

\vskip2ex

Example: $2\times 3$ game with typical strategy names;
note $-1$ written as \verb.{$-1$}., not needed for single 
integer payoffs which can even miss surrounding \verb.{ }..
For the whole game, surrounding \verb.\[ \]. gives displayed
equation.  Slightly larger cells of the table (5mm instead of 1em).

\[
\bimatrixgame{5mm}{2}{3}{I}{II}%
{{T}{B}}%
{{l}{c}{r}}
{
\payoffpairs{1}{012}{42{$-1$}}
\payoffpairs{2}{301}{132}
}
\]

\vfill
Example: $4\times 6$ game with strategy names referring to
game tree, and boxes around best-response payoffs.
Naked display without surrounding \verb.\[ \]..
Note \verb.{$\frac{1}{2}$}.\,.
Long diagonal in top left.

\renewcommand{\bimatrixrowcolor}{Red}%
\renewcommand{\bimatrixcolumncolor}{Blue}%

\renewcommand{\bimatrixdiag}{3}%
\renewcommand{\bimatrixpairfont}{\large}%
\bimatrixgame{1em}{4}{6}{I}{II}%
{{$X*$}{$Y*$}{$ZP$}{$ZQ$}}%
{{$ad$}{$ae$}{$bd$}{$be$}{$cd$}{$ce$}}
{
\payoffpairs{1}{{\fbox 3}3{\fbox 2}2{\fbox 4}{\fbox 4}}{44{\fbox 5}{\fbox 5}{\fbox 5}{\fbox 5}}
\payoffpairs{2}{22{\fbox 2}222}{{\fbox 3}{\fbox 3}{\fbox 3}{\fbox 3}{\fbox 3}{\fbox 3}}
\payoffpairs{3}{{$\frac{1}{2}$}01010}{3{\fbox 5}3{\fbox 5}3{\fbox 5}} \payoffpairs{4}{1{\fbox 4}1{\fbox 4}1{\fbox 4}}{{\fbox 3}2{\fbox 3}2{\fbox 3}2}
}

\vfill
Example: zero-sum game, also with 
no players and no diagonal in top left, smaller font,
smaller cells.

\strut\hfill
\renewcommand{\bimatrixdiag}{2}% 
\bimatrixgame{1em}{2}{2}{Max}{min}%
{{$R_L$}{$F_L$}}%
{{$m_M$}{$p_M$}}%
{
\singlepayoffs{1}{{$-1/3$}{0}}
\singlepayoffs{2}{{0}{$-1/6$}}
}
\hskip 3cm
\renewcommand{\bimatrixdiag}{0}% 
\renewcommand{\bimatrixsinglefont}{\small}% 
\bimatrixgame{.8em}{2}{2}{}{}%
{{$R_L$}{$F_L$}}%
{{$m_M$}{$p_M$}}%
{
\singlepayoffs{1}{{$-1/3$}{0}}
\singlepayoffs{2}{{0}{$-1/6$}}
}
\hfill\strut

\end{document}

