Hey everyone, Im creating a Tic-Tac-Toe game and i was wondering if i would need to hard code my function in order to get "pretty" output. Like underscores between the rows and a line between the columns.
Pretty much have the game in a table labeled columns/rows with the column number and row number there.
void printGameBoard(const char array[][COLSIZE], const int rowSize) {
//print the game board
cout << setw(30) << "Tic-Tac-Toe" << endl << setw(55)<< " " << "Player Scores" << endl << endl
<< setw(65) << "Player 1: " << xCounter << endl << setw(65) << "Player 2: " << oCounter << endl
<< setw(5) << " " << "* Player 1 is (X) and Player 2 is (O) *" << endl << endl;
//nested loop to loop the rows/columns
for (int row = 0; row < rowSize; row++) {
cout << endl;
for (int column = 0; column < COLSIZE; column++) {
cout << setw(8) << " " << setw(4) << array[row][column];
}
cout << endl << endl;
}
}