Question: Tic-Tac-Toe Game Design a program that allovs two players to play a game of tic-tac-toe. Use a two dimensional String array vith three rows and

 Tic-Tac-Toe Game Design a program that allovs two players to play

Tic-Tac-Toe Game Design a program that allovs two players to play a game of tic-tac-toe. Use a two dimensional String array vith three rows and three columns as the game board. Each elenent of the array should be initialized with an asterisk (). The program should run a loop that does the folloving: Displays the contents of the board array b. Allovs player 1 to select a location on the board for an X. The program should ask the user to enter the row and column number. c. Allovs player 2 to select a location on the board for an 0. The progr am should ask the user to enter the row and column number. d. Determines vhether a player has von or if a tie has occurred. If a player has von, the progran should declare that player the vinner and end. If a tie has occurred, program should say so and end. the Rules. Player 1 vins when there are three X's in a rov on the gane board. Player 2 vins vhen there are three 0's in a row on the game board. The vinning X's or 0's can appear in a rov, in a colum, or diagonally across the board. A tie occurs when all of the locations on the board are full, but there is no, winner. C#

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!