Question: code must be in c# Tic Tac Toe (15%) (as two dimensional array). Implement the two dimensional tic-tac-toe on 3-by-3 rectangular array as Deitel stated

code must be in c#

 code must be in c# Tic Tac Toe (15%) (as two

Tic Tac Toe (15%) (as two dimensional array).

Implement the two dimensional tic-tac-toe on 3-by-3 rectangular array as Deitel stated here. Notice that the two players take turns to paly by placing 1 and 2 (or o and x) on the square. Each move must be to an empty square, and game is over if one player has 3 in a line (row, column, or diagonal). Your game must state game is over when one side wins, or at the end of the 9th move, states that it is a draw.

Show two games where one game has a winner and another game is a draw. Ignore the authors suggestion of having computer playing against a player or develop a three-dimensional Tic-Tac-Toe.

10. (110-Tac-Toe) Create class TicTacToe that will enable you to write a complete app to play the game of Tic-Tac-Toe. The class contains a private 3-by-3 rectangular array of integers. The constructor should initialize the empty board to all os. Allow two human players. Wherever the first player moves, place a 1 in the specified square, and place a 2 wherever the second player moves. Each move must be to an empty square. After each move, determine whether the game has been won and whether it's a draw. If you feel ambitious, modify your app so that the computer makes the moves for one of the players. Also, allow the player to specify whether he or she wants to go first or second. you feel exceptionally ambitious, develop an app that will play three-dimensional Tic-Tac-To,e on a 4-by-4-by-4 board

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!