#tryna make a tic tac toe game (in the terminal not with gui) but...
12 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
If you remove the system("clear") line the program should continue running after the first player makes their move allowing player 2 to take their turn
if (turn == 1) {
if (win_check(current_board,player2)) {
cout << "Player 2 wins!" << endl;
gameon = false;
break;
} else {
if (!full_board(current_board)) {
player1s_turn(board_indexes,current_board,player1);
// Remove the line below to prevent clearing the screen
// system("clear");
cout << display(current_board) << endl;
turn = 2;
} else
cout << "Tie game!" << endl;
}
}```
@honest turtle
but then how else do i claer the output
clear*
i had it there before but it didnt terminate the program but idk what happened
can anyone pls help theres literaly no one here