\doxysection{word\+Tic\+\_\+tac\+\_\+toe.\+h}
\hypertarget{word_tic__tac__toe_8h_source}{}\label{word_tic__tac__toe_8h_source}\mbox{\hyperlink{word_tic__tac__toe_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ WORDTICTACTOE\_H}}
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ WORDTICTACTOE\_H}}
\DoxyCodeLine{00003\ }
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{_board_game___classes_8h}{BoardGame\_Classes.h}}"{}}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <fstream>}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ <set>}}
\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ <algorithm>}}
\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ <iostream>}}
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <cstdlib>}}
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <ctime>}}
\DoxyCodeLine{00011\ \textcolor{keyword}{using\ namespace\ }std;}
\DoxyCodeLine{00012\ }
\DoxyCodeLine{00013\ \textcolor{comment}{//\ Word\ Tic\ Tac\ Toe\ Board}}
\DoxyCodeLine{00014\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classword___board_afa6298efd1baf935356f0fd3490c8ae4}{word\_Board}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_board_ae5dfded241ee3644196e2f6074d1d0b1}{Board}}<char>\ \{}
\DoxyCodeLine{00015\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00016\ \ \ \ \ set<string>\ dictionary;}
\DoxyCodeLine{00017\ }
\DoxyCodeLine{00018\ \ \ \ \ \textcolor{keywordtype}{void}\ load\_dictionary()\ \{}
\DoxyCodeLine{00019\ \ \ \ \ \ \ \ \ ifstream\ file(\textcolor{stringliteral}{"{}dic.txt"{}});}
\DoxyCodeLine{00020\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{string}\ word;}
\DoxyCodeLine{00021\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ (file\ >>\ word)\ \{}
\DoxyCodeLine{00022\ \ \ \ \ \ \ \ \ \ \ \ \ transform(word.begin(),\ word.end(),\ word.begin(),\ ::toupper);}
\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \ \ \ \ dictionary.insert(word);}
\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ file.close();}
\DoxyCodeLine{00026\ \ \ \ \ \}}
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ \ \ \ \ \textcolor{keywordtype}{string}\ get\_word(\textcolor{keywordtype}{int}\ r1,\ \textcolor{keywordtype}{int}\ c1,\ \textcolor{keywordtype}{int}\ r2,\ \textcolor{keywordtype}{int}\ c2,\ \textcolor{keywordtype}{int}\ r3,\ \textcolor{keywordtype}{int}\ c3)\ \{}
\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ string(1,\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[r1][c1])\ +}
\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \ \ \ \ string(1,\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[r2][c2])\ +}
\DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ \ \ \ \ string(1,\ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[r3][c3]);}
\DoxyCodeLine{00032\ \ \ \ \ \}}
\DoxyCodeLine{00033\ }
\DoxyCodeLine{00034\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00035\ \ \ \ \ \mbox{\hyperlink{classword___board_afa6298efd1baf935356f0fd3490c8ae4}{word\_Board}}()\ :\ \mbox{\hyperlink{class_board_ae5dfded241ee3644196e2f6074d1d0b1}{Board}}(3,\ 3)\ \{}
\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ load\_dictionary();}
\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ i\ =\ 0;\ i\ <\ 3;\ i++)\ \{}
\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ j\ =\ 0;\ j\ <\ 3;\ j++)\ \{}
\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[i][j]\ =\ \textcolor{charliteral}{'\ '};}
\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00041\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00042\ \ \ \ \ \}}
\DoxyCodeLine{00043\ }
\DoxyCodeLine{00044\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classword___board_a732640f8499432481b3828df95a339e5}{update\_board}}(\mbox{\hyperlink{class_move}{Move<char>}}*\ move)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ x\ =\ move-\/>\mbox{\hyperlink{class_move_a9d4f543a81e361f872d37bcfb64d5b55}{get\_x}}();}
\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ y\ =\ move-\/>\mbox{\hyperlink{class_move_a96469802a55c9083a1e93c7edec8a00c}{get\_y}}();}
\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ symbol\ =\ move-\/>\mbox{\hyperlink{class_move_a595bf740852c05a1cb425ef2640fd4ff}{get\_symbol}}();}
\DoxyCodeLine{00048\ }
\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (x\ <\ 0\ ||\ x\ >=\ 3\ ||\ y\ <\ 0\ ||\ y\ >=\ 3)\ \{}
\DoxyCodeLine{00050\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ \textcolor{stringliteral}{"{}Invalid\ position!\ Use\ 0-\/2.\(\backslash\)n"{}};}
\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00052\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00053\ }
\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[x][y]\ !=\ \textcolor{charliteral}{'\ '})\ \{}
\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ \textcolor{stringliteral}{"{}Cell\ already\ occupied!\(\backslash\)n"{}};}
\DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00058\ }
\DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!isalpha(symbol))\ \{}
\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ \textcolor{stringliteral}{"{}Invalid\ symbol!\ Use\ letters\ only.\(\backslash\)n"{}};}
\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00062\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00063\ }
\DoxyCodeLine{00064\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_af00c1fc363eb640ca276b8a572040040}{board}}[x][y]\ =\ toupper(symbol);}
\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_board_a5952baefabced65fecec333de638408d}{n\_moves}}++;}
\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00067\ \ \ \ \ \}}
\DoxyCodeLine{00068\ }
\DoxyCodeLine{00069\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classword___board_a243a7be7ed912cfe5fd1ecf40d59d4aa}{is\_win}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Check\ all\ rows,\ columns\ and\ diagonals}}
\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{string}\ lines[8][3]\ =\ \{}
\DoxyCodeLine{00072\ \ \ \ \ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}00"{}},\ \textcolor{stringliteral}{"{}01"{}},\ \textcolor{stringliteral}{"{}02"{}}\},\ \{\textcolor{stringliteral}{"{}10"{}},\ \textcolor{stringliteral}{"{}11"{}},\ \textcolor{stringliteral}{"{}12"{}}\},\ \{\textcolor{stringliteral}{"{}20"{}},\ \textcolor{stringliteral}{"{}21"{}},\ \textcolor{stringliteral}{"{}22"{}}\},\ \textcolor{comment}{//\ Rows}}
\DoxyCodeLine{00073\ \ \ \ \ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}00"{}},\ \textcolor{stringliteral}{"{}10"{}},\ \textcolor{stringliteral}{"{}20"{}}\},\ \{\textcolor{stringliteral}{"{}01"{}},\ \textcolor{stringliteral}{"{}11"{}},\ \textcolor{stringliteral}{"{}21"{}}\},\ \{\textcolor{stringliteral}{"{}02"{}},\ \textcolor{stringliteral}{"{}12"{}},\ \textcolor{stringliteral}{"{}22"{}}\},\ \textcolor{comment}{//\ Columns}}
\DoxyCodeLine{00074\ \ \ \ \ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}00"{}},\ \textcolor{stringliteral}{"{}11"{}},\ \textcolor{stringliteral}{"{}22"{}}\},\ \{\textcolor{stringliteral}{"{}02"{}},\ \textcolor{stringliteral}{"{}11"{}},\ \textcolor{stringliteral}{"{}20"{}}\}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Diagonals}}
\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ \};}
\DoxyCodeLine{00076\ }
\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ i\ =\ 0;\ i\ <\ 8;\ i++)\ \{}
\DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ r1\ =\ lines[i][0][0]\ -\/\ \textcolor{charliteral}{'0'},\ c1\ =\ lines[i][0][1]\ -\/\ \textcolor{charliteral}{'0'};}
\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ r2\ =\ lines[i][1][0]\ -\/\ \textcolor{charliteral}{'0'},\ c2\ =\ lines[i][1][1]\ -\/\ \textcolor{charliteral}{'0'};}
\DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ r3\ =\ lines[i][2][0]\ -\/\ \textcolor{charliteral}{'0'},\ c3\ =\ lines[i][2][1]\ -\/\ \textcolor{charliteral}{'0'};}
\DoxyCodeLine{00081\ }
\DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{string}\ word\ =\ get\_word(r1,\ c1,\ r2,\ c2,\ r3,\ c3);}
\DoxyCodeLine{00083\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{string}\ rev\_word\ =\ string(word.rbegin(),\ word.rend());}
\DoxyCodeLine{00084\ }
\DoxyCodeLine{00085\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (dictionary.find(word)\ !=\ dictionary.end()\ ||}
\DoxyCodeLine{00086\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ dictionary.find(rev\_word)\ !=\ dictionary.end())\ \{}
\DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00088\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00089\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00090\ }
\DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00092\ \ \ \ \ \}}
\DoxyCodeLine{00093\ }
\DoxyCodeLine{00094\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classword___board_acf1eea94a5cee69d029b08406a8d4a1c}{is\_lose}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00096\ \ \ \ \ \}}
\DoxyCodeLine{00097\ }
\DoxyCodeLine{00098\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classword___board_a058052683b5add840816252b5151362f}{is\_draw}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00099\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ (\mbox{\hyperlink{class_board_a5952baefabced65fecec333de638408d}{n\_moves}}\ ==\ 9\ \&\&\ !\mbox{\hyperlink{classword___board_a243a7be7ed912cfe5fd1ecf40d59d4aa}{is\_win}}(player));}
\DoxyCodeLine{00100\ \ \ \ \ \}}
\DoxyCodeLine{00101\ }
\DoxyCodeLine{00102\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classword___board_a473275333aa3351d8ec135b4bfeb7861}{game\_is\_over}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00103\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classword___board_a243a7be7ed912cfe5fd1ecf40d59d4aa}{is\_win}}(player)\ ||\ \mbox{\hyperlink{classword___board_a058052683b5add840816252b5151362f}{is\_draw}}(player);}
\DoxyCodeLine{00104\ \ \ \ \ \}}
\DoxyCodeLine{00105\ \};}
\DoxyCodeLine{00106\ }
\DoxyCodeLine{00107\ \textcolor{comment}{//\ Word\ Player}}
\DoxyCodeLine{00108\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classword___player_a35876b5c250b052d5f87b836ab594919}{word\_Player}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_player_adb4e803a7ac0356b111b8ca79d766976}{Player}}<char>\ \{}
\DoxyCodeLine{00109\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00110\ \ \ \ \ \mbox{\hyperlink{classword___player_a35876b5c250b052d5f87b836ab594919}{word\_Player}}(\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{00111\ \};}
\DoxyCodeLine{00112\ }
\DoxyCodeLine{00113\ \textcolor{comment}{//\ Word\ Random\ Player}}
\DoxyCodeLine{00114\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classword___random___player_a60173971b3207fc9e9d7dc6cc218964f}{word\_Random\_Player}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_player_adb4e803a7ac0356b111b8ca79d766976}{Player}}<char>\ \{}
\DoxyCodeLine{00115\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00116\ \ \ \ \ \mbox{\hyperlink{classword___random___player_a60173971b3207fc9e9d7dc6cc218964f}{word\_Random\_Player}}(\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{00117\ \ \ \ \ \ \ \ \ srand(time(0));}
\DoxyCodeLine{00118\ \ \ \ \ \}}
\DoxyCodeLine{00119\ \};}
\DoxyCodeLine{00120\ }
\DoxyCodeLine{00121\ \textcolor{comment}{//\ Word\ UI}}
\DoxyCodeLine{00122\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classword___u_i_a6bd147aebd1882528d5fe9172fbaa0e6}{word\_UI}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_u_i_ae50eed41905ca2f8dc103d9bef427fe6}{UI}}<char>\ \{}
\DoxyCodeLine{00123\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00124\ \ \ \ \ \mbox{\hyperlink{classword___u_i_a6bd147aebd1882528d5fe9172fbaa0e6}{word\_UI}}()\ :\ \mbox{\hyperlink{class_u_i_ae50eed41905ca2f8dc103d9bef427fe6}{UI}}(\textcolor{stringliteral}{"{}Welcome\ to\ Word\ Tic-\/Tac-\/Toe!"{}},\ 3)\ \{\}}
\DoxyCodeLine{00125\ }
\DoxyCodeLine{00126\ \ \ \ \ \mbox{\hyperlink{class_move}{Move<char>}}*\ \mbox{\hyperlink{classword___u_i_af7d67f125622ed84c509b4c6539f8dac}{get\_move}}(\mbox{\hyperlink{class_player}{Player<char>}}*\ player)\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00127\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (player-\/>\mbox{\hyperlink{class_player_a2df3bd299bf7aecfa2275ec6902a60f8}{get\_type}}()\ ==\ \mbox{\hyperlink{_board_game___classes_8h_abe590f3c9109f404f003d5d7e4f0fccfaa36c6719f4d3207d858cf956ef1e93b6}{PlayerType::HUMAN}})\ \{}
\DoxyCodeLine{00128\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ x,\ y;}
\DoxyCodeLine{00129\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ letter;}
\DoxyCodeLine{00130\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ player-\/>\mbox{\hyperlink{class_player_aed2af19790ba73190e3ebeea589518e1}{get\_name}}()\ <<\ \textcolor{stringliteral}{"{}\ ("{}}\ <<\ player-\/>\mbox{\hyperlink{class_player_af56f0bf98c0423a3a75b0848607d03a4}{get\_symbol}}()}
\DoxyCodeLine{00131\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ \textcolor{stringliteral}{"{}),\ enter\ your\ move\ (row,\ column,\ and\ letter):\ "{}};}
\DoxyCodeLine{00132\ \ \ \ \ \ \ \ \ \ \ \ \ cin\ >>\ x\ >>\ y\ >>\ letter;}
\DoxyCodeLine{00133\ \ \ \ \ \ \ \ \ \ \ \ \ letter\ =\ toupper(letter);}
\DoxyCodeLine{00134\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ \mbox{\hyperlink{class_move}{Move<char>}}(x,\ y,\ letter);}
\DoxyCodeLine{00135\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00136\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{00137\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ x\ =\ rand()\ \%\ 3;}
\DoxyCodeLine{00138\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ y\ =\ rand()\ \%\ 3;}
\DoxyCodeLine{00139\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ letter\ =\ \textcolor{charliteral}{'A'}\ +\ rand()\ \%\ 26;}
\DoxyCodeLine{00140\ \ \ \ \ \ \ \ \ \ \ \ \ cout\ <<\ player-\/>\mbox{\hyperlink{class_player_aed2af19790ba73190e3ebeea589518e1}{get\_name}}()\ <<\ \textcolor{stringliteral}{"{}\ chooses\ position\ ("{}}\ <<\ x\ <<\ \textcolor{stringliteral}{"{},\ "{}}\ <<\ y}
\DoxyCodeLine{00141\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <<\ \textcolor{stringliteral}{"{})\ with\ letter\ "{}}\ <<\ letter\ <<\ \textcolor{stringliteral}{"{}\(\backslash\)n"{}};}
\DoxyCodeLine{00142\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ \mbox{\hyperlink{class_move}{Move<char>}}(x,\ y,\ letter);}
\DoxyCodeLine{00143\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00144\ \ \ \ \ \}}
\DoxyCodeLine{00145\ \};}
\DoxyCodeLine{00146\ }
\DoxyCodeLine{00147\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ WORDTICTACTOE\_H}}
\DoxyCodeLine{00148\ }

\end{DoxyCode}
