Tic-Tac-Toe Game

this is what i need Tic-Tac-Toe Game
Write a modular program that allows two players to play a game of tic-tac-toe. Use a twodimensional
char array with 3 rows and 3 columns as the game board. Each element of
the array should be initialized with an asterisk (*). The program should display the initial
board configuration and then start a loop that does the following:
• Allow player 1 to select a location on the board for an X by entering a row and column
number. Then redisplay the board with an X replacing the * in the chosen location.
• If there is no winner yet and the board is not yet full, allow player 2 to select a location
on the board for an O by entering a row and column number. Then redisplay the
board with an O replacing the * in the chosen location.
The loop should continue until a player has won or a tie has occurred, then display a message
indicating who won, or reporting that a tie occurred.
• Player 1 wins when there are three Xs in a row, a column, or a diagonal on the game
board.
• Player 2 wins when there are three Os in a row, a column, or a diagonal on the game
board.
• A tie occurs when all of the locations on the board are full, but there is no winner.
Input Validation:
Only allow legal moves to be entered. The row must be 1, 2, or 3.
The column must be 1, 2, or 3. The (row, column) position entered must currently be
empty (i.e., still have an asterisk in it).

p(1)

Place your order now to enjoy great discounts on this or a similar topic.

People choose us because we provide:

Essays written from scratch, 100% original,

Delivery within deadlines,

Competitive prices and excellent quality,

24/7 customer support,

Priority on their privacy,

Unlimited free revisions upon request, and

Plagiarism free work,

 

Order Similar Assignment Now!

  • Our Support Staff are online 24/7
  • Our Writers are available 24/7
  • Most Urgent order is delivered within 4 Hrs
  • 100% Original Assignment Plagiarism report can be sent to you upon request.

GET 15 % DISCOUNT TODAY use the discount code PAPER15 at the order form.

Type of paper Academic level Subject area
Number of pages Paper urgency Cost per page:
 Total: