i have been asked to do this program and I wrote the overall of the entire thing
ID: 3528743 • Letter: I
Question
i have been asked to do this program and I wrote the overall of the entire thing, I'm not getting any syntax errors, just logic ones, apparently it won't switch between x and o. I can't find the errors.
and i still have the isDraw method to write also. so can anyone help me pllllz !!
Problem Statement:
Tic-Tac-Toe Game In a game of Tic-Tac-Toe, two players take turns marking an available cell in a 3-by-3 grid with their respective tokens (either X or O). When one player has placed three tokens in a horizontal, vertical, or diagonal row on the grid, the game is over and that player has won. A draw (no winner) occurs when all the cells on the grid have been filled with tokens and neither player has achieved a win. Create a program for playing Tic-Tac-Toe. The program prompts two players to enter X token and O token alternately. Whenever a token is entered, the program redisplays the board on the console and determines the status of the game (win, draw, or continue). You may find the following 5 methods are useful to develop the game.
Include all these methods in a class call it TicTacToe:
1- main method: o Declare two-dimensional char array of size 3-by-3 and call it board o Display the board o In a loop Prompt the first user to enter X
? Display the board with the entered X
? Check if the first user is a winner, display message
Explanation / Answer
paste complete program here
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.