Write a program that allows two individuals to play a


Write a program that allows two individuals to play a single game of Tic-Tac-Toe.

Rules and Requirements:

  • You are to re-write Program 08, using a char array to represent the board instead of a string.
  • You must use a the following char Array to represent the nine squares of the board. Notice: board[0]will not be used.
    char [] board = new char[10];
    
  • You must re-write (and use) all of the methods indicated in Program 08, those given (by definition) as well as those prescribed (by heading), to take and use the array board (instead of the String board).
  • Your program may use additional methods where appropriate.
  • You must write a main method that allows a pair of users to play a game of Tic-Tac-Toe such that:

    Each turn of the game:

    • It must be clear whose turn it is X's or O's.
    • The current board configuration must be displayed in a reasonable format.
    • An available square number [1, 9] is obtained from a player and is used make their (valid) move on the board.
  • The game ends when there is a Tic-Tac-Toe (win) or all the positions of the board are full (stalemate). A simple report indicates which has occurred and in the case of a win, who has won X or O.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a program that allows two individuals to play a
Reference No:- TGS0661683

Expected delivery within 24 Hours