\doxysection{SUSUI.\+h}
\hypertarget{_s_u_s_u_i_8h_source}{}\label{_s_u_s_u_i_8h_source}\mbox{\hyperlink{_s_u_s_u_i_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}}
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{_board_game___classes_8h}{BoardGame\_Classes.h}}"{}}}
\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ <iostream>}}
\DoxyCodeLine{00004\ \textcolor{keyword}{using\ namespace\ }std;}
\DoxyCodeLine{00005\ }
\DoxyCodeLine{00006\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_s_u_s_u_i_a4bd9e43af7d35a88814bfaeb9f215c3e}{SUSUI}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_u_i_ae50eed41905ca2f8dc103d9bef427fe6}{UI}}<char>\ \{}
\DoxyCodeLine{00007\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ }
\DoxyCodeLine{00010\ \ \ \ \ \textcolor{comment}{//SUSUI()\ :\ UI<char>(3)\ \{\}}}
\DoxyCodeLine{00011\ \ \ \ \ \mbox{\hyperlink{class_s_u_s_u_i_a4bd9e43af7d35a88814bfaeb9f215c3e}{SUSUI}}()\ :\ \mbox{\hyperlink{class_u_i_ae50eed41905ca2f8dc103d9bef427fe6}{UI}}<char>(\textcolor{stringliteral}{"{}SUS\ Game"{}},\ 3)\ \{\}\ \ \textcolor{comment}{//constructo}}
\DoxyCodeLine{00012\ \ \ \ \ \mbox{\hyperlink{class_move}{Move<char>}}*\ \mbox{\hyperlink{class_s_u_s_u_i_ac91226ae211f9d4ca587570b16738286}{get\_move}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ p)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00013\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ x,\ y;}
\DoxyCodeLine{00014\ \ \ \ \ \ \ \ \ \textcolor{comment}{//Added\ Computer\ Log}}
\DoxyCodeLine{00015\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (p-\/>\mbox{\hyperlink{class_player_a2df3bd299bf7aecfa2275ec6902a60f8}{get\_type}}()\ ==\ \mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccfad19cbc472227d1e3d1d276c2cbc0e513}{PlayerType::COMPUTER}})\ \{}
\DoxyCodeLine{00016\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Computer\ move\ logic}}
\DoxyCodeLine{00017\ \ \ \ \ \ \ \ \ \ \ \ \ srand(\textcolor{keyword}{static\_cast<}\textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\textcolor{keyword}{>}(time(0)));}
\DoxyCodeLine{00018\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ board\_matrix\ =\ p-\/>\mbox{\hyperlink{class_player_a508617eddfae8915d098102d480fc888}{get\_board\_ptr}}()-\/>get\_board\_matrix();}
\DoxyCodeLine{00019\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{do}\ \{}
\DoxyCodeLine{00020\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ x\ =\ rand()\ \%\ 3;}
\DoxyCodeLine{00021\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ y\ =\ rand()\ \%\ 3;}
\DoxyCodeLine{00022\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{while}\ (board\_matrix[x][y]\ !=\ \textcolor{charliteral}{'\ '});}
\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ \textcolor{stringliteral}{"{}\(\backslash\)nComputer\ played\ at\ ("{}}\ <<\ x\ <<\ \textcolor{stringliteral}{"{},"{}}\ <<\ y\ <<\ \textcolor{stringliteral}{"{})\(\backslash\)n"{}};}
\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ \mbox{\hyperlink{class_move}{Move<char>}}(x,\ y,\ p-\/>\mbox{\hyperlink{class_player_af56f0bf98c0423a3a75b0848607d03a4}{get\_symbol}}());}
\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00026\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{00027\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Human\ move}}
\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ p-\/>\mbox{\hyperlink{class_player_aed2af19790ba73190e3ebeea589518e1}{get\_name}}()\ <<\ \textcolor{stringliteral}{"{}\ ("{}}\ <<\ p-\/>\mbox{\hyperlink{class_player_af56f0bf98c0423a3a75b0848607d03a4}{get\_symbol}}()\ <<\ \textcolor{stringliteral}{"{})\ enter\ x\ y\ (0-\/2):\ "{}};}
\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ \ \ \ \ cin\ >>\ x\ >>\ y;}
\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ \mbox{\hyperlink{class_move}{Move<char>}}(x,\ y,\ p-\/>\mbox{\hyperlink{class_player_af56f0bf98c0423a3a75b0848607d03a4}{get\_symbol}}());}
\DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00032\ \ \ \ \ \}}
\DoxyCodeLine{00033\ }
\DoxyCodeLine{00034\ }
\DoxyCodeLine{00035\ }
\DoxyCodeLine{00036\ \ \ \ \ \textcolor{comment}{//\ Added\ BY\ AO}}
\DoxyCodeLine{00037\ \ \ \ \ \mbox{\hyperlink{class_player}{Player<char>}}*\ \mbox{\hyperlink{class_s_u_s_u_i_ab2c309f6c5943ea834b84e687555b9ec}{create\_player}}(\textcolor{keywordtype}{string}\&\ name,\ \textcolor{keywordtype}{char}\ symbol,\ \mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccf}{PlayerType}}\ type)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ cout\ <<\ \textcolor{stringliteral}{"{}Creating\ "{}}\ <<\ (type\ ==\ \mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccfaa36c6719f4d3207d858cf956ef1e93b6}{PlayerType::HUMAN}}\ ?\ \textcolor{stringliteral}{"{}human"{}}\ :\ \textcolor{stringliteral}{"{}computer"{}})}
\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \ \ \ \ <<\ \textcolor{stringliteral}{"{}\ player:\ "{}}\ <<\ name\ <<\ \textcolor{stringliteral}{"{}\ ("{}}\ <<\ symbol\ <<\ \textcolor{stringliteral}{"{})\(\backslash\)n"{}};}
\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ \mbox{\hyperlink{class_player}{Player<char>}}(name,\ symbol,\ type);}
\DoxyCodeLine{00041\ \ \ \ \ \}}
\DoxyCodeLine{00042\ }
\DoxyCodeLine{00043\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_s_u_s_u_i_acaa663874791a8249be1f841f8d2fc65}{display\_message}}(\textcolor{keywordtype}{string}\ s)\ \{}
\DoxyCodeLine{00044\ \ \ \ \ \ \ \ \ cout\ <<\ s\ <<\ endl;}
\DoxyCodeLine{00045\ \ \ \ \ \}}
\DoxyCodeLine{00046\ \};}
\DoxyCodeLine{00047\ }
\DoxyCodeLine{00048\ }

\end{DoxyCode}
