\doxysection{UI\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>} Class Template Reference}
\hypertarget{class_u_i}{}\label{class_u_i}\index{UI$<$ T $>$@{UI$<$ T $>$}}


Base class for handling user interface and input/output.  




{\ttfamily \#include $<$Board\+Game\+\_\+\+Classes.\+h$>$}

\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_u_i_ae50eed41905ca2f8dc103d9bef427fe6}{UI}} (string message, int cell\+\_\+display\+\_\+width)
\begin{DoxyCompactList}\small\item\em Construct the \doxylink{class_u_i}{UI} and display a welcome message. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{class_u_i_a1012e508ff7df030714c62ddf6b261a7}{\texorpdfstring{$\sim$}{\string~}\+UI}} ()
\item 
void \mbox{\hyperlink{class_u_i_a1eead148ee8726b8ea329c2cd8841d18}{display\+\_\+message}} (string message)
\begin{DoxyCompactList}\small\item\em Display any message to the user. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{class_move}{Move}}$<$ T $>$ \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_u_i_a8befa259c38c57e6ae2e8ed81c476337}{get\+\_\+move}} (\mbox{\hyperlink{class_player}{Player}}$<$ T $>$ \texorpdfstring{$\ast$}{*})=0
\begin{DoxyCompactList}\small\item\em Ask the user (or AI) to make a move. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{class_player}{Player}}$<$ T $>$ \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_u_i_a6966a040c995b2292e5edddaa94f889a}{setup\+\_\+players}} ()
\begin{DoxyCompactList}\small\item\em Set up players for the game. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{class_player}{Player}}$<$ T $>$ \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_u_i_af9f043033208286cd56240a1f060dd7b}{create\+\_\+player}} (string \&name, T symbol, \mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccf}{Player\+Type}} type)=0
\begin{DoxyCompactList}\small\item\em Create a player object based on input name, symbol, and type. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_u_i_a5d4655d5ff273e284fd68b8547483a23}{display\+\_\+board\+\_\+matrix}} (const vector$<$ vector$<$ T $>$ $>$ \&matrix) const
\begin{DoxyCompactList}\small\item\em Display the current board matrix in formatted form. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
string \mbox{\hyperlink{class_u_i_a8617bbf64a9ddf11ea6231912044805d}{get\+\_\+player\+\_\+name}} (string player\+\_\+label)
\begin{DoxyCompactList}\small\item\em Ask the user for the player\textquotesingle{}s name. \end{DoxyCompactList}\item 
\mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccf}{Player\+Type}} \mbox{\hyperlink{class_u_i_ae62d61367ea51a5d7532db3b830c6445}{get\+\_\+player\+\_\+type\+\_\+choice}} (string player\+\_\+label, const vector$<$ string $>$ \&options)
\begin{DoxyCompactList}\small\item\em Ask the user to choose the player type from a list. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
int \mbox{\hyperlink{class_u_i_a6c79c489ae9aa3a7860fb58e5a14ddfe}{cell\+\_\+width}}
\begin{DoxyCompactList}\small\item\em Width of each displayed board cell. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\subsubsection*{template$<$typename T$>$\newline
class UI$<$ T $>$}
Base class for handling user interface and input/output. 


\begin{DoxyTemplParams}{Template Parameters}
{\em T} & The type of symbol used on the board. \\
\hline
\end{DoxyTemplParams}


\label{doc-constructors}
\Hypertarget{class_u_i_doc-constructors}
\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{class_u_i_ae50eed41905ca2f8dc103d9bef427fe6}\index{UI$<$ T $>$@{UI$<$ T $>$}!UI@{UI}}
\index{UI@{UI}!UI$<$ T $>$@{UI$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{UI()}{UI()}}
{\footnotesize\ttfamily \label{class_u_i_ae50eed41905ca2f8dc103d9bef427fe6} 
template$<$typename T$>$ \\
\mbox{\hyperlink{class_u_i}{UI}}$<$ T $>$\+::\+UI (\begin{DoxyParamCaption}\item[{string}]{message}{, }\item[{int}]{cell\+\_\+display\+\_\+width}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Construct the \doxylink{class_u_i}{UI} and display a welcome message. 

\Hypertarget{class_u_i_a1012e508ff7df030714c62ddf6b261a7}\index{UI$<$ T $>$@{UI$<$ T $>$}!````~UI@{\texorpdfstring{$\sim$}{\string~}UI}}
\index{````~UI@{\texorpdfstring{$\sim$}{\string~}UI}!UI$<$ T $>$@{UI$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\sim$}{\string~}UI()}{\string~UI()}}
{\footnotesize\ttfamily \label{class_u_i_a1012e508ff7df030714c62ddf6b261a7} 
template$<$typename T$>$ \\
virtual \mbox{\hyperlink{class_u_i}{UI}}$<$ T $>$\+::\texorpdfstring{$\sim$}{\string~}\mbox{\hyperlink{class_u_i}{UI}} (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



\label{doc-func-members}
\Hypertarget{class_u_i_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{class_u_i_af9f043033208286cd56240a1f060dd7b}\index{UI$<$ T $>$@{UI$<$ T $>$}!create\_player@{create\_player}}
\index{create\_player@{create\_player}!UI$<$ T $>$@{UI$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{create\_player()}{create\_player()}}
{\footnotesize\ttfamily \label{class_u_i_af9f043033208286cd56240a1f060dd7b} 
template$<$typename T$>$ \\
virtual \mbox{\hyperlink{class_player}{Player}}$<$ T $>$ \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_u_i}{UI}}$<$ T $>$\+::create\+\_\+player (\begin{DoxyParamCaption}\item[{string \&}]{name}{, }\item[{T}]{symbol}{, }\item[{\mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccf}{Player\+Type}}}]{type}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Create a player object based on input name, symbol, and type. 



Implemented in \mbox{\hyperlink{class_four_u_i_aa608f5a529dc94504ac16e9ce43d1b0e}{Four\+UI}}, \mbox{\hyperlink{class_numerical___u_i_a8080e8fa3d81fa39ae59b4554ca0b880}{Numerical\+\_\+\+UI}}, \mbox{\hyperlink{class_s_u_s_u_i_ab2c309f6c5943ea834b84e687555b9ec}{SUSUI}}, and \mbox{\hyperlink{class_tic_tac_toe4x4___u_i_a2df345ec5ab8bd66c86efaf266a1e27b}{Tic\+Tac\+Toe4x4\+\_\+\+UI}}.

\Hypertarget{class_u_i_a5d4655d5ff273e284fd68b8547483a23}\index{UI$<$ T $>$@{UI$<$ T $>$}!display\_board\_matrix@{display\_board\_matrix}}
\index{display\_board\_matrix@{display\_board\_matrix}!UI$<$ T $>$@{UI$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{display\_board\_matrix()}{display\_board\_matrix()}}
{\footnotesize\ttfamily \label{class_u_i_a5d4655d5ff273e284fd68b8547483a23} 
template$<$typename T$>$ \\
void \mbox{\hyperlink{class_u_i}{UI}}$<$ T $>$\+::display\+\_\+board\+\_\+matrix (\begin{DoxyParamCaption}\item[{const vector$<$ vector$<$ T $>$ $>$ \&}]{matrix}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Display the current board matrix in formatted form. 

\Hypertarget{class_u_i_a1eead148ee8726b8ea329c2cd8841d18}\index{UI$<$ T $>$@{UI$<$ T $>$}!display\_message@{display\_message}}
\index{display\_message@{display\_message}!UI$<$ T $>$@{UI$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{display\_message()}{display\_message()}}
{\footnotesize\ttfamily \label{class_u_i_a1eead148ee8726b8ea329c2cd8841d18} 
template$<$typename T$>$ \\
void \mbox{\hyperlink{class_u_i}{UI}}$<$ T $>$\+::display\+\_\+message (\begin{DoxyParamCaption}\item[{string}]{message}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Display any message to the user. 

\Hypertarget{class_u_i_a8befa259c38c57e6ae2e8ed81c476337}\index{UI$<$ T $>$@{UI$<$ T $>$}!get\_move@{get\_move}}
\index{get\_move@{get\_move}!UI$<$ T $>$@{UI$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{get\_move()}{get\_move()}}
{\footnotesize\ttfamily \label{class_u_i_a8befa259c38c57e6ae2e8ed81c476337} 
template$<$typename T$>$ \\
virtual \mbox{\hyperlink{class_move}{Move}}$<$ T $>$ \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_u_i}{UI}}$<$ T $>$\+::get\+\_\+move (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_player}{Player}}$<$ T $>$ \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Ask the user (or AI) to make a move. 



Implemented in \mbox{\hyperlink{class_diamond_tic_tac_toe___u_i_a9b503c3a2bbb76652fabd8e7481967ac}{Diamond\+Tic\+Tac\+Toe\+\_\+\+UI}}, \mbox{\hyperlink{class_four_in_a_row_u_i_a94d07315f510beefce5213a12989156d}{Four\+In\+ARow\+UI}}, \mbox{\hyperlink{class_four_u_i_a210c7b394756f34acc72f9b31ba6665e}{Four\+UI}}, \mbox{\hyperlink{class_infinity_tic_tac_toe___u_i_aa54dd3a424e681a37fdcd456a9d38ece}{Infinity\+Tic\+Tac\+Toe\+\_\+\+UI}}, \mbox{\hyperlink{class_memory_tic_tac_toe___u_i_a619044292ab4cb439f7d72f968de258c}{Memory\+Tic\+Tac\+Toe\+\_\+\+UI}}, \mbox{\hyperlink{class_misere_tic_tac_toe___u_i_ae759315de006058a04da1510a4b98a5b}{Misere\+Tic\+Tac\+Toe\+\_\+\+UI}}, \mbox{\hyperlink{class_numerical___u_i_a740484f354117eb09bafcd3092b41cd6}{Numerical\+\_\+\+UI}}, \mbox{\hyperlink{class_numerical_tic_tac_toe_u_i_ac794fa35de1ea2bbe295e294898c6b0f}{Numerical\+Tic\+Tac\+Toe\+UI}}, \mbox{\hyperlink{class_obstacles_tic_tac_toe___u_i_a636cfc09a5dbbce163b9c0abc2cc0541}{Obstacles\+Tic\+Tac\+Toe\+\_\+\+UI}}, \mbox{\hyperlink{class_pyramic___x_o___u_i_a6e4ece491287bd964b1dbe627d8aa765}{Pyramic\+\_\+\+XO\+\_\+\+UI}}, \mbox{\hyperlink{class_s_u_s___u_i_a9c7a3c09a5e18a3d89f448ea93b6dea6}{SUS\+\_\+\+UI}}, \mbox{\hyperlink{class_s_u_s_u_i_ac91226ae211f9d4ca587570b16738286}{SUSUI}}, \mbox{\hyperlink{class_tic_tac_toe4x4___u_i_a29b41fd75bd8dd6f9bac54f2bbbeb076}{Tic\+Tac\+Toe4x4\+\_\+\+UI}}, \mbox{\hyperlink{class_tic_tac_toe5x5___u_i_ac20b36ae7e19a034dc16735141aeca81}{Tic\+Tac\+Toe5x5\+\_\+\+UI}}, \mbox{\hyperlink{class_ultimate_tic_tac_toe___u_i_a4338a56b42da0f2b00ad0d0eb5659a92}{Ultimate\+Tic\+Tac\+Toe\+\_\+\+UI}}, \mbox{\hyperlink{classword___u_i_af7d67f125622ed84c509b4c6539f8dac}{word\+\_\+\+UI}}, and \mbox{\hyperlink{class_x_o___u_i_a16f0f9fc6136125e2515c1bc0734924f}{XO\+\_\+\+UI}}.

\Hypertarget{class_u_i_a8617bbf64a9ddf11ea6231912044805d}\index{UI$<$ T $>$@{UI$<$ T $>$}!get\_player\_name@{get\_player\_name}}
\index{get\_player\_name@{get\_player\_name}!UI$<$ T $>$@{UI$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{get\_player\_name()}{get\_player\_name()}}
{\footnotesize\ttfamily \label{class_u_i_a8617bbf64a9ddf11ea6231912044805d} 
template$<$typename T$>$ \\
string \mbox{\hyperlink{class_u_i}{UI}}$<$ T $>$\+::get\+\_\+player\+\_\+name (\begin{DoxyParamCaption}\item[{string}]{player\+\_\+label}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [protected]}}



Ask the user for the player\textquotesingle{}s name. 

\Hypertarget{class_u_i_ae62d61367ea51a5d7532db3b830c6445}\index{UI$<$ T $>$@{UI$<$ T $>$}!get\_player\_type\_choice@{get\_player\_type\_choice}}
\index{get\_player\_type\_choice@{get\_player\_type\_choice}!UI$<$ T $>$@{UI$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{get\_player\_type\_choice()}{get\_player\_type\_choice()}}
{\footnotesize\ttfamily \label{class_u_i_ae62d61367ea51a5d7532db3b830c6445} 
template$<$typename T$>$ \\
\mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccf}{Player\+Type}} \mbox{\hyperlink{class_u_i}{UI}}$<$ T $>$\+::get\+\_\+player\+\_\+type\+\_\+choice (\begin{DoxyParamCaption}\item[{string}]{player\+\_\+label}{, }\item[{const vector$<$ string $>$ \&}]{options}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [protected]}}



Ask the user to choose the player type from a list. 

\Hypertarget{class_u_i_a6966a040c995b2292e5edddaa94f889a}\index{UI$<$ T $>$@{UI$<$ T $>$}!setup\_players@{setup\_players}}
\index{setup\_players@{setup\_players}!UI$<$ T $>$@{UI$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{setup\_players()}{setup\_players()}}
{\footnotesize\ttfamily \label{class_u_i_a6966a040c995b2292e5edddaa94f889a} 
template$<$typename T$>$ \\
\mbox{\hyperlink{class_player}{Player}}$<$ T $>$ \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{class_u_i}{UI}}$<$ T $>$\+::setup\+\_\+players (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Set up players for the game. 

Default implementation of setting up two players. 

\label{doc-variable-members}
\Hypertarget{class_u_i_doc-variable-members}
\doxysubsection{Member Data Documentation}
\Hypertarget{class_u_i_a6c79c489ae9aa3a7860fb58e5a14ddfe}\index{UI$<$ T $>$@{UI$<$ T $>$}!cell\_width@{cell\_width}}
\index{cell\_width@{cell\_width}!UI$<$ T $>$@{UI$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{cell\_width}{cell\_width}}
{\footnotesize\ttfamily \label{class_u_i_a6c79c489ae9aa3a7860fb58e5a14ddfe} 
template$<$typename T$>$ \\
int \mbox{\hyperlink{class_u_i}{UI}}$<$ T $>$\+::cell\+\_\+width\hspace{0.3cm}{\ttfamily [protected]}}



Width of each displayed board cell. 



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{_board_game___classes_8h}{Board\+Game\+\_\+\+Classes.\+h}}\end{DoxyCompactItemize}
