\doxysection{Numerical\+Tic\+Tac\+Toe.\+h}
\hypertarget{_numerical_tic_tac_toe_8h_source}{}\label{_numerical_tic_tac_toe_8h_source}\mbox{\hyperlink{_numerical_tic_tac_toe_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ NUMERICALTICTACTOE\_H}}
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ NUMERICALTICTACTOE\_H}}
\DoxyCodeLine{00003\ }
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{_board_game___classes_8h}{BoardGame\_Classes.h}}"{}}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <iostream>}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ <set>}}
\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ <cstdlib>}}
\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ <ctime>}}
\DoxyCodeLine{00009\ \textcolor{keyword}{using\ namespace\ }std;}
\DoxyCodeLine{00010\ }
\DoxyCodeLine{00011\ \textcolor{comment}{//\ Numerical\ Tic\ Tac\ Toe\ Board}}
\DoxyCodeLine{00012\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_numerical_tic_tac_toe_board_a8d837c67518a39495480c5ebb932cb06}{NumericalTicTacToeBoard}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_board_ae5dfded241ee3644196e2f6074d1d0b1}{Board}}<int>\ \{}
\DoxyCodeLine{00013\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00014\ \ \ \ \ set<int>\ used\_numbers;}
\DoxyCodeLine{00015\ }
\DoxyCodeLine{00016\ \ \ \ \ \textcolor{keywordtype}{bool}\ check\_sum(\textcolor{keywordtype}{int}\ a,\ \textcolor{keywordtype}{int}\ b,\ \textcolor{keywordtype}{int}\ c)\ \{}
\DoxyCodeLine{00017\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ (a\ +\ b\ +\ c\ ==\ 15);}
\DoxyCodeLine{00018\ \ \ \ \ \}}
\DoxyCodeLine{00019\ }
\DoxyCodeLine{00020\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00021\ \ \ \ \ \mbox{\hyperlink{class_numerical_tic_tac_toe_board_a8d837c67518a39495480c5ebb932cb06}{NumericalTicTacToeBoard}}()\ :\ \mbox{\hyperlink{class_board_ae5dfded241ee3644196e2f6074d1d0b1}{Board}}(3,\ 3)\ \{}
\DoxyCodeLine{00022\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ i\ =\ 0;\ i\ <\ 3;\ i++)\ \{}
\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ j\ =\ 0;\ j\ <\ 3;\ j++)\ \{}
\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[i][j]\ =\ 0;}
\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00026\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00027\ \ \ \ \ \}}
\DoxyCodeLine{00028\ }
\DoxyCodeLine{00029\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_numerical_tic_tac_toe_board_afa5ae973db22da5a788dd81a257e5253}{update\_board}}(\mbox{\hyperlink{class_move}{Move<int>}}*\ move)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ x\ =\ move-\/>\mbox{\hyperlink{class_move_a9d4f543a81e361f872d37bcfb64d5b55}{get\_x}}();}
\DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ y\ =\ move-\/>\mbox{\hyperlink{class_move_a96469802a55c9083a1e93c7edec8a00c}{get\_y}}();}
\DoxyCodeLine{00032\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ number\ =\ move-\/>\mbox{\hyperlink{class_move_a595bf740852c05a1cb425ef2640fd4ff}{get\_symbol}}();}
\DoxyCodeLine{00033\ }
\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (x\ <\ 0\ ||\ x\ >=\ 3\ ||\ y\ <\ 0\ ||\ y\ >=\ 3)\ \{}
\DoxyCodeLine{00035\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ \textcolor{stringliteral}{"{}Invalid\ position!\ Use\ 0-\/2.\(\backslash\)n"{}};}
\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00038\ }
\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[x][y]\ !=\ 0)\ \{}
\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ \textcolor{stringliteral}{"{}Cell\ already\ occupied!\(\backslash\)n"{}};}
\DoxyCodeLine{00041\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00043\ }
\DoxyCodeLine{00044\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (number\ <\ 1\ ||\ number\ >\ 9)\ \{}
\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ \textcolor{stringliteral}{"{}Number\ must\ be\ 1-\/9!\(\backslash\)n"{}};}
\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00048\ }
\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (used\_numbers.find(number)\ !=\ used\_numbers.end())\ \{}
\DoxyCodeLine{00050\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ \textcolor{stringliteral}{"{}Number\ "{}}\ <<\ number\ <<\ \textcolor{stringliteral}{"{}\ already\ used!\(\backslash\)n"{}};}
\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00052\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00053\ }
\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Check\ parity:\ Player\ 1\ (odd\ moves)\ uses\ odd\ numbers,\ Player\ 2\ uses\ even}}
\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ ((\mbox{\hyperlink{class_board_a5952baefabced65fecec333de638408d}{n\_moves}}\ \%\ 2\ ==\ 0\ \&\&\ number\ \%\ 2\ ==\ 0)\ ||}
\DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ \ \ \ \ (\mbox{\hyperlink{class_board_a5952baefabced65fecec333de638408d}{n\_moves}}\ \%\ 2\ ==\ 1\ \&\&\ number\ \%\ 2\ ==\ 1))\ \{}
\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ \textcolor{stringliteral}{"{}Wrong\ number\ type!\ Player\ "{}}\ <<\ (\mbox{\hyperlink{class_board_a5952baefabced65fecec333de638408d}{n\_moves}}\ \%\ 2\ ==\ 0\ ?\ \textcolor{stringliteral}{"{}1"{}}\ :\ \textcolor{stringliteral}{"{}2"{}})}
\DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ \textcolor{stringliteral}{"{}\ must\ use\ "{}}\ <<\ (\mbox{\hyperlink{class_board_a5952baefabced65fecec333de638408d}{n\_moves}}\ \%\ 2\ ==\ 0\ ?\ \textcolor{stringliteral}{"{}odd"{}}\ :\ \textcolor{stringliteral}{"{}even"{}})\ <<\ \textcolor{stringliteral}{"{}\ number.\(\backslash\)n"{}};}
\DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00061\ }
\DoxyCodeLine{00062\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[x][y]\ =\ number;}
\DoxyCodeLine{00063\ \ \ \ \ \ \ \ \ used\_numbers.insert(number);}
\DoxyCodeLine{00064\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_a5952baefabced65fecec333de638408d}{n\_moves}}++;}
\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00066\ \ \ \ \ \}}
\DoxyCodeLine{00067\ }
\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_numerical_tic_tac_toe_board_a0929966d3f78f7e566b141bce7f18155}{is\_win}}(\mbox{\hyperlink{class_player}{Player<int>}}*\ player)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00069\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Check\ rows}}
\DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ i\ =\ 0;\ i\ <\ 3;\ i++)\ \{}
\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (check\_sum(\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[i][0],\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[i][1],\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[i][2]))}
\DoxyCodeLine{00072\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00073\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00074\ }
\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Check\ columns}}
\DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ j\ =\ 0;\ j\ <\ 3;\ j++)\ \{}
\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (check\_sum(\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[0][j],\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[1][j],\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[2][j]))}
\DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00080\ }
\DoxyCodeLine{00081\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Check\ diagonals}}
\DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (check\_sum(\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[0][0],\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[1][1],\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[2][2])\ ||}
\DoxyCodeLine{00083\ \ \ \ \ \ \ \ \ \ \ \ \ check\_sum(\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[0][2],\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[1][1],\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[2][0]))}
\DoxyCodeLine{00084\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00085\ }
\DoxyCodeLine{00086\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00087\ \ \ \ \ \}}
\DoxyCodeLine{00088\ }
\DoxyCodeLine{00089\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_numerical_tic_tac_toe_board_a9f50721e4f1e49491c95e0f348bccc68}{is\_lose}}(\mbox{\hyperlink{class_player}{Player<int>}}*\ player)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00091\ \ \ \ \ \}}
\DoxyCodeLine{00092\ }
\DoxyCodeLine{00093\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_numerical_tic_tac_toe_board_a30f11edae923aeb9da4565bdec1cb71a}{is\_draw}}(\mbox{\hyperlink{class_player}{Player<int>}}*\ player)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ (\mbox{\hyperlink{class_board_a5952baefabced65fecec333de638408d}{n\_moves}}\ ==\ 9\ \&\&\ !\mbox{\hyperlink{class_numerical_tic_tac_toe_board_a0929966d3f78f7e566b141bce7f18155}{is\_win}}(player));}
\DoxyCodeLine{00095\ \ \ \ \ \}}
\DoxyCodeLine{00096\ }
\DoxyCodeLine{00097\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_numerical_tic_tac_toe_board_a84d93b6304f5f69c210ea77222e752e8}{game\_is\_over}}(\mbox{\hyperlink{class_player}{Player<int>}}*\ player)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00098\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{class_numerical_tic_tac_toe_board_a0929966d3f78f7e566b141bce7f18155}{is\_win}}(player)\ ||\ \mbox{\hyperlink{class_numerical_tic_tac_toe_board_a30f11edae923aeb9da4565bdec1cb71a}{is\_draw}}(player);}
\DoxyCodeLine{00099\ \ \ \ \ \}}
\DoxyCodeLine{00100\ \};}
\DoxyCodeLine{00101\ }
\DoxyCodeLine{00102\ \textcolor{comment}{//\ Numerical\ Player}}
\DoxyCodeLine{00103\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_numerical_tic_tac_toe_player_a8090b5d1af60d0fb9d47c9fad82091de}{NumericalTicTacToePlayer}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_player_adb4e803a7ac0356b111b8ca79d766976}{Player}}<int>\ \{}
\DoxyCodeLine{00104\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00105\ \ \ \ \ \mbox{\hyperlink{class_numerical_tic_tac_toe_player_a8090b5d1af60d0fb9d47c9fad82091de}{NumericalTicTacToePlayer}}(\textcolor{keywordtype}{string}\ \mbox{\hyperlink{class_player_af0ad0d4ca8584d23a98c723cd703a4f6}{name}},\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{class_player_a272d6c4dab769930d4f8074918e7708a}{symbol}})\ :\ \mbox{\hyperlink{class_player_adb4e803a7ac0356b111b8ca79d766976}{Player}}(\mbox{\hyperlink{class_player_af0ad0d4ca8584d23a98c723cd703a4f6}{name}},\ \mbox{\hyperlink{class_player_a272d6c4dab769930d4f8074918e7708a}{symbol}},\ \mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccf}{PlayerType}}::\mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccfaa36c6719f4d3207d858cf956ef1e93b6}{HUMAN}})\ \{\}}
\DoxyCodeLine{00106\ \};}
\DoxyCodeLine{00107\ }
\DoxyCodeLine{00108\ \textcolor{comment}{//\ Numerical\ Random\ Player}}
\DoxyCodeLine{00109\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_numerical_tic_tac_toe_random_player_acdc28f65f09e7a989a3384e69b6259d4}{NumericalTicTacToeRandomPlayer}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_player_adb4e803a7ac0356b111b8ca79d766976}{Player}}<int>\ \{}
\DoxyCodeLine{00110\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00111\ \ \ \ \ \mbox{\hyperlink{class_numerical_tic_tac_toe_random_player_acdc28f65f09e7a989a3384e69b6259d4}{NumericalTicTacToeRandomPlayer}}(\textcolor{keywordtype}{int}\ \mbox{\hyperlink{class_player_a272d6c4dab769930d4f8074918e7708a}{symbol}})\ :\ \mbox{\hyperlink{class_player_adb4e803a7ac0356b111b8ca79d766976}{Player}}(\textcolor{stringliteral}{"{}Random\ Computer"{}},\ \mbox{\hyperlink{class_player_a272d6c4dab769930d4f8074918e7708a}{symbol}},\ \mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccf}{PlayerType}}::\mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccfad19cbc472227d1e3d1d276c2cbc0e513}{COMPUTER}})\ \{}
\DoxyCodeLine{00112\ \ \ \ \ \ \ \ \ srand(time(0));}
\DoxyCodeLine{00113\ \ \ \ \ \}}
\DoxyCodeLine{00114\ \};}
\DoxyCodeLine{00115\ }
\DoxyCodeLine{00116\ \textcolor{comment}{//\ Numerical\ UI}}
\DoxyCodeLine{00117\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_numerical_tic_tac_toe_u_i_a8eb4907cae01def6a7a0f55551850018}{NumericalTicTacToeUI}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_u_i_ae50eed41905ca2f8dc103d9bef427fe6}{UI}}<int>\ \{}
\DoxyCodeLine{00118\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00119\ \ \ \ \ \mbox{\hyperlink{class_numerical_tic_tac_toe_u_i_a8eb4907cae01def6a7a0f55551850018}{NumericalTicTacToeUI}}()\ :\ \mbox{\hyperlink{class_u_i_ae50eed41905ca2f8dc103d9bef427fe6}{UI}}(\textcolor{stringliteral}{"{}Welcome\ to\ Numerical\ Tic-\/Tac-\/Toe!"{}},\ 3)\ \{\}}
\DoxyCodeLine{00120\ }
\DoxyCodeLine{00121\ \ \ \ \ \mbox{\hyperlink{class_move}{Move<int>}}*\ \mbox{\hyperlink{class_numerical_tic_tac_toe_u_i_ac794fa35de1ea2bbe295e294898c6b0f}{get\_move}}(\mbox{\hyperlink{class_player}{Player<int>}}*\ player)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00122\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (player-\/>\mbox{\hyperlink{class_player_a2df3bd299bf7aecfa2275ec6902a60f8}{get\_type}}()\ ==\ \mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccfaa36c6719f4d3207d858cf956ef1e93b6}{PlayerType::HUMAN}})\ \{}
\DoxyCodeLine{00123\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ x,\ y,\ number;}
\DoxyCodeLine{00124\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ player-\/>\mbox{\hyperlink{class_player_aed2af19790ba73190e3ebeea589518e1}{get\_name}}()\ <<\ \textcolor{stringliteral}{"{}\ ("{}}}
\DoxyCodeLine{00125\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ (player-\/>\mbox{\hyperlink{class_player_af56f0bf98c0423a3a75b0848607d03a4}{get\_symbol}}()\ ==\ 1\ ?\ \textcolor{stringliteral}{"{}Odd"{}}\ :\ \textcolor{stringliteral}{"{}Even"{}})}
\DoxyCodeLine{00126\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ \textcolor{stringliteral}{"{}\ numbers),\ enter\ your\ move\ (row,\ column,\ and\ number):\ "{}};}
\DoxyCodeLine{00127\ \ \ \ \ \ \ \ \ \ \ \ \ cin\ >>\ x\ >>\ y\ >>\ number;}
\DoxyCodeLine{00128\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ \mbox{\hyperlink{class_move}{Move<int>}}(x,\ y,\ number);}
\DoxyCodeLine{00129\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00130\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{00131\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ x\ =\ rand()\ \%\ 3;}
\DoxyCodeLine{00132\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ y\ =\ rand()\ \%\ 3;}
\DoxyCodeLine{00133\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ number;}
\DoxyCodeLine{00134\ }
\DoxyCodeLine{00135\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Generate\ appropriate\ number\ based\ on\ turn}}
\DoxyCodeLine{00136\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (player-\/>\mbox{\hyperlink{class_player_af56f0bf98c0423a3a75b0848607d03a4}{get\_symbol}}()\ ==\ 1)\ \{\ \textcolor{comment}{//\ Odd\ numbers}}
\DoxyCodeLine{00137\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ number\ =\ (rand()\ \%\ 5)\ *\ 2\ +\ 1;\ \textcolor{comment}{//\ 1,\ 3,\ 5,\ 7,\ 9}}
\DoxyCodeLine{00138\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00139\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \{\ \textcolor{comment}{//\ Even\ numbers}}
\DoxyCodeLine{00140\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ number\ =\ (rand()\ \%\ 4)\ *\ 2\ +\ 2;\ \textcolor{comment}{//\ 2,\ 4,\ 6,\ 8}}
\DoxyCodeLine{00141\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00142\ }
\DoxyCodeLine{00143\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ player-\/>\mbox{\hyperlink{class_player_aed2af19790ba73190e3ebeea589518e1}{get\_name}}()\ <<\ \textcolor{stringliteral}{"{}\ chooses\ position\ ("{}}\ <<\ x\ <<\ \textcolor{stringliteral}{"{},\ "{}}\ <<\ y}
\DoxyCodeLine{00144\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ \textcolor{stringliteral}{"{})\ with\ number\ "{}}\ <<\ number\ <<\ \textcolor{stringliteral}{"{}\(\backslash\)n"{}};}
\DoxyCodeLine{00145\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ \mbox{\hyperlink{class_move}{Move<int>}}(x,\ y,\ number);}
\DoxyCodeLine{00146\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00147\ \ \ \ \ \}}
\DoxyCodeLine{00148\ \};}
\DoxyCodeLine{00149\ }
\DoxyCodeLine{00150\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ NUMERICALTICTACTOE\_H}}
\DoxyCodeLine{00151\ }

\end{DoxyCode}
