Question: Tic Tac Toe Comments at beginning of program stating what it does Comments within the program method to create the board method to put Xs

Tic Tac Toe

Comments at beginning of program stating what it does

Comments within the program

method to create the board

method to put Xs and Os in right place

method to print the board

method to check for winner

loop

correct output

fist task is to create the 'board' with the lines in the right places and the numbers in the right places. This method (we called it createBoard returns the board to main. The next method you need is to print the board. Put these two methods in main. Run your program and make sure you get the right output. ALSO - and this is REALLY important. I made a mistake last night. When you first make your board you need to fill it all with spaces BEFORE you put the lines in. for(int i=0; i<11; i++) for(int k=0; k<11; k++) board[i][k]=' '; //there is a single space here If you are more comfortable putting the {} in the loops, it looks like this: for(int i=0; i<11; i++) {for(int k=0; k<11; k++) {board[i][k]=' '; } //there is a single space here }

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!