#Include Iostream
#Include Iostream
#Include Iostream
int choice;
char turn = 'X';
int row, column;
bool draw = false;
char board[3][3] = { {'1', '2', '3'}, {'4', '5', '6'}, {'7', '8', '9'} };
void display_board() {
cout << "\t\tT I C K A N D C R O S S G A M E\n";
cout << "\t\tPlayer1 [X]\n\t\tPlayer2 [O]\n";
cout << "\t\t | | \n";
cout << "\t\t " << board[0][0] << " | " << board[0][1] << " | " <<
board[0][2] << " \n";
cout << "\t\t_____|_____|_____\n";
cout << "\t\t | | \n";
cout << "\t\t " << board[1][0] << " | " << board[1][1] << " | " <<
board[1][2] << " \n";
cout << "\t\t_____|_____|_____\n";
cout << "\t\t | | \n";
cout << "\t\t " << board[2][0] << " | " << board[2][1] << " | " <<
board[2][2] << " \n";
cout << "\t\t | | \n";
}
void player_turn() {
if (turn == 'X')
cout << "\n\n\tPlayer1 [X] turn: ";
else
cout << "\n\n\tPlayer2 [O] turn: ";
bool gameover() {
for (int i = 0; i < 3; i++) {
if (board[i][0] == board[i][1] && board[i][1] == board[i][2])
return false;
if (board[0][i] == board[1][i] && board[1][i] == board[2][i])
return false;
}
draw = true;
return false;
}
int main() {
while (gameover()) {
display_board();
player_turn();
}
return 0;
}