Question: here is the code: #include using namespace std; void printBoard(const char b[][3], const int size); void placeMove(char b[][3], int row, int col, char player); int

 here is the code: #include using namespace std; void printBoard(const char

here is the code:

#include using namespace std;

void printBoard(const char b[][3], const int size); void placeMove(char b[][3], int row, int col, char player);

int main() {

/* Type your code here. */

return 0; }

5.14 LAB: 2D arrays For this lab we will be working with a 2D array of characters. A standard tic-tac-toe game can be viewed as a 3x3 2D array. First, create your 3x3 array, and fill it with spaces (remember, by default any array is full of garbage!). To see your board, create a printBoard function to print out the array with pipes (T) before and after each element of the array. (3 pts) Ex: Next, we are going to implement a (very) simple gameplay function: placeMove (1pt). This function will not do any error checking, but simply assume that good row, column, and player character data are passed to it. Your main should prompt the user for a row, column, and character. After this, you should call your placeMove function, followed by a call to printBoard. (2pts) Ex: Enter row: 1 Enter column: 2 Enter player character x or o) o For fun download your submission and modify in Code Blocks Modify to prompt users for placeMove in a loopmake it a real game

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!