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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started