\doxysection{Tic\+Tac\+Toe4x4.\+h}
\hypertarget{_tic_tac_toe4x4_8h_source}{}\label{_tic_tac_toe4x4_8h_source}\mbox{\hyperlink{_tic_tac_toe4x4_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ TICTACTOE4X4\_H}}
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ TICTACTOE4X4\_H}}
\DoxyCodeLine{00003\ }
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{_board_game___classes_8h}{BoardGame\_Classes.h}}"{}}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <cstdlib>}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ <ctime>}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_tic_tac_toe4x4___board_a2f768287b477040661ebf02b7068f6b2}{TicTacToe4x4\_Board}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_board_ae5dfded241ee3644196e2f6074d1d0b1}{Board}}<char>\ \{}
\DoxyCodeLine{00009\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00010\ \ \ \ \ \mbox{\hyperlink{class_tic_tac_toe4x4___board_a2f768287b477040661ebf02b7068f6b2}{TicTacToe4x4\_Board}}();}
\DoxyCodeLine{00011\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_tic_tac_toe4x4___board_a0e808fde60e30aa54c13dbfe40d3e2b4}{update\_board}}(\mbox{\hyperlink{class_move}{Move<char>}}*\ move)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00012\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_tic_tac_toe4x4___board_a6dc263cabed28de11eafbdb93b5ee05b}{is\_win}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00013\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_tic_tac_toe4x4___board_a23ffe37d6486d8cdcb12f437f71c9f3f}{is\_draw}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00014\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_tic_tac_toe4x4___board_a278ea1df4b5523542bc3f15c211fec63}{is\_lose}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00015\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_tic_tac_toe4x4___board_aad817b74508a90141df6e9f9c62941c5}{game\_is\_over}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00016\ \};}
\DoxyCodeLine{00017\ }
\DoxyCodeLine{00018\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_tic_tac_toe4x4___player_a9f69a40a97222f9a05f382ea4ab7b023}{TicTacToe4x4\_Player}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_player_adb4e803a7ac0356b111b8ca79d766976}{Player}}<char>\ \{}
\DoxyCodeLine{00019\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00020\ \ \ \ \ \mbox{\hyperlink{class_tic_tac_toe4x4___player_a9f69a40a97222f9a05f382ea4ab7b023}{TicTacToe4x4\_Player}}(\textcolor{keywordtype}{string}\ \mbox{\hyperlink{class_player_af0ad0d4ca8584d23a98c723cd703a4f6}{name}},\ \textcolor{keywordtype}{char}\ \mbox{\hyperlink{class_player_a272d6c4dab769930d4f8074918e7708a}{symbol}},\ \mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccf}{PlayerType}}\ \mbox{\hyperlink{class_player_a81a15b1b507fd5f2157fb15bf0fd283f}{type}})}
\DoxyCodeLine{00021\ \ \ \ \ \ \ \ \ :\ \mbox{\hyperlink{class_player_adb4e803a7ac0356b111b8ca79d766976}{Player}}<char>(\mbox{\hyperlink{class_player_af0ad0d4ca8584d23a98c723cd703a4f6}{name}},\ \mbox{\hyperlink{class_player_a272d6c4dab769930d4f8074918e7708a}{symbol}},\ \mbox{\hyperlink{class_player_a81a15b1b507fd5f2157fb15bf0fd283f}{type}})\ \{\}}
\DoxyCodeLine{00022\ \};}
\DoxyCodeLine{00023\ }
\DoxyCodeLine{00024\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_tic_tac_toe4x4___u_i_a94b685eb0e0d0b61410b06210fe65826}{TicTacToe4x4\_UI}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_u_i_ae50eed41905ca2f8dc103d9bef427fe6}{UI}}<char>\ \{}
\DoxyCodeLine{00025\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00026\ \ \ \ \ \mbox{\hyperlink{class_tic_tac_toe4x4___u_i_a94b685eb0e0d0b61410b06210fe65826}{TicTacToe4x4\_UI}}()\ :\ \mbox{\hyperlink{class_u_i_ae50eed41905ca2f8dc103d9bef427fe6}{UI}}<char>(\textcolor{stringliteral}{"{}4x4\ TicTacToe"{}},\ 3)\ \{\}}
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ \ \ \ \ \mbox{\hyperlink{class_move}{Move<char>}}*\ \mbox{\hyperlink{class_tic_tac_toe4x4___u_i_a29b41fd75bd8dd6f9bac54f2bbbeb076}{get\_move}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ p)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ x,\ y;}
\DoxyCodeLine{00030\ }
\DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Computer\ move}}
\DoxyCodeLine{00032\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (p-\/>\mbox{\hyperlink{class_player_a2df3bd299bf7aecfa2275ec6902a60f8}{get\_type}}()\ ==\ \mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccfad19cbc472227d1e3d1d276c2cbc0e513}{PlayerType::COMPUTER}})\ \{}
\DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ \ \ \ \ srand(time(0));}
\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ board\_matrix\ =\ p-\/>\mbox{\hyperlink{class_player_a508617eddfae8915d098102d480fc888}{get\_board\_ptr}}()-\/>get\_board\_matrix();}
\DoxyCodeLine{00035\ }
\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ find\ an\ empty\ cell}}
\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{do}\ \{}
\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ x\ =\ rand()\ \%\ 4;}
\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ y\ =\ rand()\ \%\ 4;}
\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{while}\ (board\_matrix[x][y]\ !=\ \textcolor{charliteral}{'\ '});}
\DoxyCodeLine{00041\ }
\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ \textcolor{stringliteral}{"{}\(\backslash\)nComputer\ played\ at\ ("{}}\ <<\ x\ <<\ \textcolor{stringliteral}{"{},"{}}\ <<\ y\ <<\ \textcolor{stringliteral}{"{})\(\backslash\)n"{}};}
\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ \mbox{\hyperlink{class_move}{Move<char>}}(x,\ y,\ p-\/>\mbox{\hyperlink{class_player_af56f0bf98c0423a3a75b0848607d03a4}{get\_symbol}}());}
\DoxyCodeLine{00044\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00045\ }
\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Human\ move}}
\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ (\textcolor{keyword}{true})\ \{}
\DoxyCodeLine{00048\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ \textcolor{stringliteral}{"{}\(\backslash\)n"{}}\ <<\ p-\/>\mbox{\hyperlink{class_player_aed2af19790ba73190e3ebeea589518e1}{get\_name}}()\ <<\ \textcolor{stringliteral}{"{}\ enter\ row\ and\ column\ [0-\/3]:\ "{}};}
\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ \ \ \ \ cin\ >>\ x\ >>\ y;}
\DoxyCodeLine{00050\ }
\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (x\ <\ 0\ ||\ x\ >\ 3\ ||\ y\ <\ 0\ ||\ y\ >\ 3)\ \{}
\DoxyCodeLine{00052\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ \textcolor{stringliteral}{"{}Invalid\ cell.\ Please\ enter\ values\ between\ 0-\/3.\(\backslash\)n"{}};}
\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00055\ }
\DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ board\_matrix\ =\ p-\/>\mbox{\hyperlink{class_player_a508617eddfae8915d098102d480fc888}{get\_board\_ptr}}()-\/>get\_board\_matrix();}
\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (board\_matrix[x][y]\ !=\ \textcolor{charliteral}{'\ '})\ \{}
\DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ \textcolor{stringliteral}{"{}Box\ already\ occupied.\ Choose\ another\ Box.\(\backslash\)n"{}};}
\DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00061\ }
\DoxyCodeLine{00062\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ \mbox{\hyperlink{class_move}{Move<char>}}(x,\ y,\ p-\/>\mbox{\hyperlink{class_player_af56f0bf98c0423a3a75b0848607d03a4}{get\_symbol}}());}
\DoxyCodeLine{00063\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00064\ \ \ \ \ \}}
\DoxyCodeLine{00065\ }
\DoxyCodeLine{00066\ \ \ \ \ \mbox{\hyperlink{class_player}{Player<char>}}*\ \mbox{\hyperlink{class_tic_tac_toe4x4___u_i_a2df345ec5ab8bd66c86efaf266a1e27b}{create\_player}}(\textcolor{keywordtype}{string}\&\ name,\ \textcolor{keywordtype}{char}\ symbol,\ \mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccf}{PlayerType}}\ type)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ \mbox{\hyperlink{class_tic_tac_toe4x4___player}{TicTacToe4x4\_Player}}(name,\ symbol,\ type);}
\DoxyCodeLine{00068\ \ \ \ \ \}}
\DoxyCodeLine{00069\ \};}
\DoxyCodeLine{00070\ }
\DoxyCodeLine{00071\ \textcolor{comment}{//\ Implementation}}
\DoxyCodeLine{00072\ \mbox{\hyperlink{class_tic_tac_toe4x4___board_a2f768287b477040661ebf02b7068f6b2}{TicTacToe4x4\_Board::TicTacToe4x4\_Board}}()\ :\ \mbox{\hyperlink{class_board_ae5dfded241ee3644196e2f6074d1d0b1}{Board}}(4,\ 4)\ \{}
\DoxyCodeLine{00073\ \ \ \ \ \textcolor{comment}{//\ Initialize\ empty\ board}}
\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ row\ :\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}})\ \{}
\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ cell\ :\ row)\ \{}
\DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ \ \ \ \ cell\ =\ \textcolor{charliteral}{'\ '};}
\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00078\ \ \ \ \ \}}
\DoxyCodeLine{00079\ \ \ \ \ \mbox{\hyperlink{class_board_a5952baefabced65fecec333de638408d}{n\_moves}}\ =\ 0;}
\DoxyCodeLine{00080\ \}}
\DoxyCodeLine{00081\ }
\DoxyCodeLine{00082\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_tic_tac_toe4x4___board_a0e808fde60e30aa54c13dbfe40d3e2b4}{TicTacToe4x4\_Board::update\_board}}(\mbox{\hyperlink{class_move}{Move<char>}}*\ move)\ \{}
\DoxyCodeLine{00083\ \ \ \ \ \textcolor{keywordtype}{int}\ x\ =\ move-\/>\mbox{\hyperlink{class_move_a9d4f543a81e361f872d37bcfb64d5b55}{get\_x}}();}
\DoxyCodeLine{00084\ \ \ \ \ \textcolor{keywordtype}{int}\ y\ =\ move-\/>\mbox{\hyperlink{class_move_a96469802a55c9083a1e93c7edec8a00c}{get\_y}}();}
\DoxyCodeLine{00085\ \ \ \ \ \textcolor{keywordtype}{char}\ symbol\ =\ move-\/>\mbox{\hyperlink{class_move_a595bf740852c05a1cb425ef2640fd4ff}{get\_symbol}}();}
\DoxyCodeLine{00086\ }
\DoxyCodeLine{00087\ \ \ \ \ \textcolor{comment}{//\ Check\ if\ move\ is\ valid}}
\DoxyCodeLine{00088\ \ \ \ \ \textcolor{keywordflow}{if}\ (x\ <\ 0\ ||\ x\ >=\ \mbox{\hyperlink{class_board_a948d978e3b5fc460559b588f5dee9572}{rows}}\ ||\ y\ <\ 0\ ||\ y\ >=\ \mbox{\hyperlink{class_board_afaf8842d9d52ac724e8c2f5642ecafc7}{columns}})\ \{}
\DoxyCodeLine{00089\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00090\ \ \ \ \ \}}
\DoxyCodeLine{00091\ }
\DoxyCodeLine{00092\ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[x][y]\ !=\ \textcolor{charliteral}{'\ '})\ \{}
\DoxyCodeLine{00093\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00094\ \ \ \ \ \}}
\DoxyCodeLine{00095\ }
\DoxyCodeLine{00096\ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[x][y]\ =\ symbol;}
\DoxyCodeLine{00097\ \ \ \ \ \mbox{\hyperlink{class_board_a5952baefabced65fecec333de638408d}{n\_moves}}++;}
\DoxyCodeLine{00098\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00099\ \}}
\DoxyCodeLine{00100\ }
\DoxyCodeLine{00101\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_tic_tac_toe4x4___board_a6dc263cabed28de11eafbdb93b5ee05b}{TicTacToe4x4\_Board::is\_win}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\ \{}
\DoxyCodeLine{00102\ \ \ \ \ \textcolor{keywordtype}{char}\ symbol\ =\ player-\/>\mbox{\hyperlink{class_player_af56f0bf98c0423a3a75b0848607d03a4}{get\_symbol}}();}
\DoxyCodeLine{00103\ }
\DoxyCodeLine{00104\ \ \ \ \ \textcolor{comment}{//\ Check\ rows}}
\DoxyCodeLine{00105\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ i\ =\ 0;\ i\ <\ 4;\ i++)\ \{}
\DoxyCodeLine{00106\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[i][0]\ ==\ symbol\ \&\&\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[i][1]\ ==\ symbol\ \&\&}
\DoxyCodeLine{00107\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[i][2]\ ==\ symbol\ \&\&\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[i][3]\ ==\ symbol)\ \{}
\DoxyCodeLine{00108\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00109\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00110\ \ \ \ \ \}}
\DoxyCodeLine{00111\ }
\DoxyCodeLine{00112\ \ \ \ \ \textcolor{comment}{//\ Check\ columns}}
\DoxyCodeLine{00113\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ j\ =\ 0;\ j\ <\ 4;\ j++)\ \{}
\DoxyCodeLine{00114\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[0][j]\ ==\ symbol\ \&\&\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[1][j]\ ==\ symbol\ \&\&}
\DoxyCodeLine{00115\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[2][j]\ ==\ symbol\ \&\&\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[3][j]\ ==\ symbol)\ \{}
\DoxyCodeLine{00116\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00117\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00118\ \ \ \ \ \}}
\DoxyCodeLine{00119\ }
\DoxyCodeLine{00120\ \ \ \ \ \textcolor{comment}{//\ Check\ diagonals}}
\DoxyCodeLine{00121\ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[0][0]\ ==\ symbol\ \&\&\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[1][1]\ ==\ symbol\ \&\&}
\DoxyCodeLine{00122\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[2][2]\ ==\ symbol\ \&\&\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[3][3]\ ==\ symbol)\ \{}
\DoxyCodeLine{00123\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00124\ \ \ \ \ \}}
\DoxyCodeLine{00125\ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[0][3]\ ==\ symbol\ \&\&\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[1][2]\ ==\ symbol\ \&\&}
\DoxyCodeLine{00126\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[2][1]\ ==\ symbol\ \&\&\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[3][0]\ ==\ symbol)\ \{}
\DoxyCodeLine{00127\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00128\ \ \ \ \ \}}
\DoxyCodeLine{00129\ }
\DoxyCodeLine{00130\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00131\ \}}
\DoxyCodeLine{00132\ }
\DoxyCodeLine{00133\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_tic_tac_toe4x4___board_a23ffe37d6486d8cdcb12f437f71c9f3f}{TicTacToe4x4\_Board::is\_draw}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\ \{}
\DoxyCodeLine{00134\ \ \ \ \ \textcolor{comment}{//\ Check\ if\ board\ is\ full\ and\ no\ win}}
\DoxyCodeLine{00135\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ i\ =\ 0;\ i\ <\ \mbox{\hyperlink{class_board_a948d978e3b5fc460559b588f5dee9572}{rows}};\ i++)\ \{}
\DoxyCodeLine{00136\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ j\ =\ 0;\ j\ <\ \mbox{\hyperlink{class_board_afaf8842d9d52ac724e8c2f5642ecafc7}{columns}};\ j++)\ \{}
\DoxyCodeLine{00137\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[i][j]\ ==\ \textcolor{charliteral}{'\ '})\ \{}
\DoxyCodeLine{00138\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00139\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00140\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00141\ \ \ \ \ \}}
\DoxyCodeLine{00142\ \ \ \ \ \textcolor{keywordflow}{return}\ !\mbox{\hyperlink{class_tic_tac_toe4x4___board_a6dc263cabed28de11eafbdb93b5ee05b}{is\_win}}(player);}
\DoxyCodeLine{00143\ \}}
\DoxyCodeLine{00144\ }
\DoxyCodeLine{00145\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_tic_tac_toe4x4___board_a278ea1df4b5523542bc3f15c211fec63}{TicTacToe4x4\_Board::is\_lose}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\ \{}
\DoxyCodeLine{00146\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00147\ \}}
\DoxyCodeLine{00148\ }
\DoxyCodeLine{00149\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_tic_tac_toe4x4___board_aad817b74508a90141df6e9f9c62941c5}{TicTacToe4x4\_Board::game\_is\_over}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\ \{}
\DoxyCodeLine{00150\ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{class_tic_tac_toe4x4___board_a6dc263cabed28de11eafbdb93b5ee05b}{is\_win}}(player)\ ||\ \mbox{\hyperlink{class_tic_tac_toe4x4___board_a23ffe37d6486d8cdcb12f437f71c9f3f}{is\_draw}}(player);}
\DoxyCodeLine{00151\ \}}
\DoxyCodeLine{00152\ }
\DoxyCodeLine{00153\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ TICTACTOE4X4\_H}}

\end{DoxyCode}
