Question: ASAP!!! Page 12 Question (60 points) Write a program that allows two players to play a game of Toc-Tac-Tic. This game is also called avoidance

 ASAP!!! Page 12 Question (60 points) Write a program that allows
two players to play a game of Toc-Tac-Tic. This game is alsoASAP!!!

Page 12 Question (60 points) Write a program that allows two players to play a game of Toc-Tac-Tic. This game is also called avoidance tic-tac-toe. This game has similar rules to the traditional tic-tac-toe except that the Player who completes three consecutive Xs or os loses. Use a two dimensional char array with three rows and three columns as the game board. Each clement of the amay should be initialized with an asterisk The program should run loop that: 1. Displays the current contents of the board array. 2. Allows player select a location on the board for an X The program should ask the user to enter Xto the row and column number. Determines whether a player has won, or a tie has occurred 4 Allows player o to select a location on the board for an o. The program should ask the user to enter the rowa and column number. 5. Go back to step 1 if there was no tie and nobody won. a row and column values these values should be validated. The player is allowed Whenever a play to reenter the values when: both of the values the location entered was already chosen When a player wins, the program should declare the winner and terminate. If a tie has occurred, the program should say so and terminate. Payer X wins when there are three Os in a row on the game board. The Os can appear in a row, in a column, or diagonally across the board. A tie occurs when all of the locations on the board are full, but there is no winner. The following is an example of a partial run of the program: welcome to Toe Tac Tic Columns Player X's turn. Enter a row and column to place an X Invalid Row! Row: 2 Colunn 14 Invalid Column unni 2 Row 3: Player O's turn Enter a row and column to place an o

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!