\doxysection{Four\+In\+ARow.\+h}
\hypertarget{_four_in_a_row_8h_source}{}\label{_four_in_a_row_8h_source}\mbox{\hyperlink{_four_in_a_row_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ FOURINAROW\_H}}
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ FOURINAROW\_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\ <cstdlib>}}
\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ <ctime>}}
\DoxyCodeLine{00008\ \textcolor{keyword}{using\ namespace\ }std;}
\DoxyCodeLine{00009\ }
\DoxyCodeLine{00010\ \textcolor{comment}{//\ Four\ in\ a\ Row\ Board}}
\DoxyCodeLine{00011\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_four_in_a_row_board_a57c406ce8df75c639a1224a231780bcb}{FourInARowBoard}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_board_ae5dfded241ee3644196e2f6074d1d0b1}{Board}}<char>\ \{}
\DoxyCodeLine{00012\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00013\ \ \ \ \ \textcolor{keywordtype}{int}\ get\_lowest\_empty\_row(\textcolor{keywordtype}{int}\ col)\ \{}
\DoxyCodeLine{00014\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ row\ =\ 0;\ row\ <\ 6;\ row++)\ \{}
\DoxyCodeLine{00015\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row][col]\ ==\ \textcolor{charliteral}{'\ '})\ \{}
\DoxyCodeLine{00016\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ row;}
\DoxyCodeLine{00017\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00018\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00019\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ -\/1;}
\DoxyCodeLine{00020\ \ \ \ \ \}}
\DoxyCodeLine{00021\ }
\DoxyCodeLine{00022\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00023\ \ \ \ \ \mbox{\hyperlink{class_four_in_a_row_board_a57c406ce8df75c639a1224a231780bcb}{FourInARowBoard}}()\ :\ \mbox{\hyperlink{class_board_ae5dfded241ee3644196e2f6074d1d0b1}{Board}}(6,\ 7)\ \{}
\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ i\ =\ 0;\ i\ <\ 6;\ i++)\ \{}
\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ j\ =\ 0;\ j\ <\ 7;\ j++)\ \{}
\DoxyCodeLine{00026\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[i][j]\ =\ \textcolor{charliteral}{'\ '};}
\DoxyCodeLine{00027\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00029\ \ \ \ \ \}}
\DoxyCodeLine{00030\ }
\DoxyCodeLine{00031\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_four_in_a_row_board_a63ae9b1f904a7cb859f351cc7ab24471}{update\_board}}(\mbox{\hyperlink{class_move}{Move<char>}}*\ move)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00032\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ col\ =\ move-\/>\mbox{\hyperlink{class_move_a96469802a55c9083a1e93c7edec8a00c}{get\_y}}();}
\DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ symbol\ =\ move-\/>\mbox{\hyperlink{class_move_a595bf740852c05a1cb425ef2640fd4ff}{get\_symbol}}();}
\DoxyCodeLine{00034\ }
\DoxyCodeLine{00035\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (col\ <\ 0\ ||\ col\ >=\ 7)\ \{}
\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ \textcolor{stringliteral}{"{}Invalid\ column!\ Choose\ 0-\/6.\(\backslash\)n"{}};}
\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00039\ }
\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ row\ =\ get\_lowest\_empty\_row(col);}
\DoxyCodeLine{00041\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (row\ ==\ -\/1)\ \{}
\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ \textcolor{stringliteral}{"{}Column\ "{}}\ <<\ col\ <<\ \textcolor{stringliteral}{"{}\ is\ full!\(\backslash\)n"{}};}
\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00044\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00045\ }
\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row][col]\ =\ symbol;}
\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_a5952baefabced65fecec333de638408d}{n\_moves}}++;}
\DoxyCodeLine{00048\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00049\ \ \ \ \ \}}
\DoxyCodeLine{00050\ }
\DoxyCodeLine{00051\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_four_in_a_row_board_acab2128bd5e2331441d458804edcbd74}{is\_win}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00052\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ symbol\ =\ player-\/>\mbox{\hyperlink{class_player_af56f0bf98c0423a3a75b0848607d03a4}{get\_symbol}}();}
\DoxyCodeLine{00053\ }
\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Horizontal}}
\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ row\ =\ 0;\ row\ <\ 6;\ row++)\ \{}
\DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ col\ =\ 0;\ col\ <\ 4;\ col++)\ \{}
\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row][col]\ ==\ symbol\ \&\&}
\DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row][col\ +\ 1]\ ==\ symbol\ \&\&}
\DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row][col\ +\ 2]\ ==\ symbol\ \&\&}
\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row][col\ +\ 3]\ ==\ symbol)}
\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00062\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00063\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00064\ }
\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Vertical}}
\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ col\ =\ 0;\ col\ <\ 7;\ col++)\ \{}
\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ row\ =\ 0;\ row\ <\ 3;\ row++)\ \{}
\DoxyCodeLine{00068\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row][col]\ ==\ symbol\ \&\&}
\DoxyCodeLine{00069\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row\ +\ 1][col]\ ==\ symbol\ \&\&}
\DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row\ +\ 2][col]\ ==\ symbol\ \&\&}
\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row\ +\ 3][col]\ ==\ symbol)}
\DoxyCodeLine{00072\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00073\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00074\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00075\ }
\DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Diagonal\ down-\/right}}
\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ row\ =\ 0;\ row\ <\ 3;\ row++)\ \{}
\DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ col\ =\ 0;\ col\ <\ 4;\ col++)\ \{}
\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row][col]\ ==\ symbol\ \&\&}
\DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row\ +\ 1][col\ +\ 1]\ ==\ symbol\ \&\&}
\DoxyCodeLine{00081\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row\ +\ 2][col\ +\ 2]\ ==\ symbol\ \&\&}
\DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row\ +\ 3][col\ +\ 3]\ ==\ symbol)}
\DoxyCodeLine{00083\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00084\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00085\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00086\ }
\DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Diagonal\ down-\/left}}
\DoxyCodeLine{00088\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ row\ =\ 0;\ row\ <\ 3;\ row++)\ \{}
\DoxyCodeLine{00089\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ col\ =\ 3;\ col\ <\ 7;\ col++)\ \{}
\DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row][col]\ ==\ symbol\ \&\&}
\DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row\ +\ 1][col\ -\/\ 1]\ ==\ symbol\ \&\&}
\DoxyCodeLine{00092\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row\ +\ 2][col\ -\/\ 2]\ ==\ symbol\ \&\&}
\DoxyCodeLine{00093\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[row\ +\ 3][col\ -\/\ 3]\ ==\ symbol)}
\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00096\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00097\ }
\DoxyCodeLine{00098\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00099\ \ \ \ \ \}}
\DoxyCodeLine{00100\ }
\DoxyCodeLine{00101\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_four_in_a_row_board_a19489322bc5e34869fa8d02c7296da21}{is\_lose}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00102\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00103\ \ \ \ \ \}}
\DoxyCodeLine{00104\ }
\DoxyCodeLine{00105\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_four_in_a_row_board_a4d5c490fb7bd3f48e13abe93d88aab30}{is\_draw}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00106\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ col\ =\ 0;\ col\ <\ 7;\ col++)\ \{}
\DoxyCodeLine{00107\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[5][col]\ ==\ \textcolor{charliteral}{'\ '})\ \{}
\DoxyCodeLine{00108\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00109\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00110\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00111\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ !\mbox{\hyperlink{class_four_in_a_row_board_acab2128bd5e2331441d458804edcbd74}{is\_win}}(player);}
\DoxyCodeLine{00112\ \ \ \ \ \}}
\DoxyCodeLine{00113\ }
\DoxyCodeLine{00114\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_four_in_a_row_board_a3262e33856526a21dfbb476ac07b0f12}{game\_is\_over}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00115\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{class_four_in_a_row_board_acab2128bd5e2331441d458804edcbd74}{is\_win}}(player)\ ||\ \mbox{\hyperlink{class_four_in_a_row_board_a4d5c490fb7bd3f48e13abe93d88aab30}{is\_draw}}(player);}
\DoxyCodeLine{00116\ \ \ \ \ \}}
\DoxyCodeLine{00117\ \};}
\DoxyCodeLine{00118\ }
\DoxyCodeLine{00119\ \textcolor{comment}{//\ Four\ in\ a\ Row\ Player}}
\DoxyCodeLine{00120\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_four_in_a_row_player_aadcb60de61eb678d8b75beb50ef2f133}{FourInARowPlayer}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_player_adb4e803a7ac0356b111b8ca79d766976}{Player}}<char>\ \{}
\DoxyCodeLine{00121\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00122\ \ \ \ \ \mbox{\hyperlink{class_four_in_a_row_player_aadcb60de61eb678d8b75beb50ef2f133}{FourInARowPlayer}}(\textcolor{keywordtype}{string}\ \mbox{\hyperlink{class_player_af0ad0d4ca8584d23a98c723cd703a4f6}{name}},\ \textcolor{keywordtype}{char}\ \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{00123\ \};}
\DoxyCodeLine{00124\ }
\DoxyCodeLine{00125\ \textcolor{comment}{//\ Four\ in\ a\ Row\ Random\ Player}}
\DoxyCodeLine{00126\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_four_in_a_row_random_player_a07f73ec777eb91680386a7714a8d1540}{FourInARowRandomPlayer}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_player_adb4e803a7ac0356b111b8ca79d766976}{Player}}<char>\ \{}
\DoxyCodeLine{00127\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00128\ \ \ \ \ \mbox{\hyperlink{class_four_in_a_row_random_player_a07f73ec777eb91680386a7714a8d1540}{FourInARowRandomPlayer}}(\textcolor{keywordtype}{char}\ \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{00129\ \ \ \ \ \ \ \ \ srand(time(0));}
\DoxyCodeLine{00130\ \ \ \ \ \}}
\DoxyCodeLine{00131\ \};}
\DoxyCodeLine{00132\ }
\DoxyCodeLine{00133\ \textcolor{comment}{//\ Four\ in\ a\ Row\ UI}}
\DoxyCodeLine{00134\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_four_in_a_row_u_i_ac626f51230f78c014eb17fc389f8be96}{FourInARowUI}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_u_i_ae50eed41905ca2f8dc103d9bef427fe6}{UI}}<char>\ \{}
\DoxyCodeLine{00135\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00136\ \ \ \ \ \mbox{\hyperlink{class_four_in_a_row_u_i_ac626f51230f78c014eb17fc389f8be96}{FourInARowUI}}()\ :\ \mbox{\hyperlink{class_u_i_ae50eed41905ca2f8dc103d9bef427fe6}{UI}}(\textcolor{stringliteral}{"{}Welcome\ to\ Four-\/in-\/a-\/Row!"{}},\ 3)\ \{\}}
\DoxyCodeLine{00137\ }
\DoxyCodeLine{00138\ \ \ \ \ \mbox{\hyperlink{class_move}{Move<char>}}*\ \mbox{\hyperlink{class_four_in_a_row_u_i_a94d07315f510beefce5213a12989156d}{get\_move}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00139\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (player-\/>\mbox{\hyperlink{class_player_a2df3bd299bf7aecfa2275ec6902a60f8}{get\_type}}()\ ==\ \mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccfaa36c6719f4d3207d858cf956ef1e93b6}{PlayerType::HUMAN}})\ \{}
\DoxyCodeLine{00140\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ col;}
\DoxyCodeLine{00141\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ player-\/>\mbox{\hyperlink{class_player_aed2af19790ba73190e3ebeea589518e1}{get\_name}}()\ <<\ \textcolor{stringliteral}{"{}\ ("{}}\ <<\ player-\/>\mbox{\hyperlink{class_player_af56f0bf98c0423a3a75b0848607d03a4}{get\_symbol}}()}
\DoxyCodeLine{00142\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ \textcolor{stringliteral}{"{}),\ enter\ column\ (0-\/6):\ "{}};}
\DoxyCodeLine{00143\ \ \ \ \ \ \ \ \ \ \ \ \ cin\ >>\ col;}
\DoxyCodeLine{00144\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ \mbox{\hyperlink{class_move}{Move<char>}}(0,\ col,\ player-\/>\mbox{\hyperlink{class_player_af56f0bf98c0423a3a75b0848607d03a4}{get\_symbol}}());}
\DoxyCodeLine{00145\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00146\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{00147\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ col\ =\ rand()\ \%\ 7;}
\DoxyCodeLine{00148\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ player-\/>\mbox{\hyperlink{class_player_aed2af19790ba73190e3ebeea589518e1}{get\_name}}()\ <<\ \textcolor{stringliteral}{"{}\ chooses\ column\ "{}}\ <<\ col\ <<\ \textcolor{stringliteral}{"{}\(\backslash\)n"{}};}
\DoxyCodeLine{00149\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ \mbox{\hyperlink{class_move}{Move<char>}}(0,\ col,\ player-\/>\mbox{\hyperlink{class_player_af56f0bf98c0423a3a75b0848607d03a4}{get\_symbol}}());}
\DoxyCodeLine{00150\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00151\ \ \ \ \ \}}
\DoxyCodeLine{00152\ \};}
\DoxyCodeLine{00153\ }
\DoxyCodeLine{00154\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ FOURINAROW\_H}}

\end{DoxyCode}
