Develop a Windows application using C# .Net that simulates a game of tic-tac-toe. The application should use
Question:
Develop a Windows application using C# .Net that simulates a game of tic-tac-toe. The application should use a two-dimensional array to simulate the game board in memory, which will be reflected on the form using nine large Label controls to display the Xs and Os. The application should display a message indicating whether player X won, player Y won, or the game was a tie. The application shall also track the winner of multiple plays of the game.
Write the proper event procedures (i.e. code) that:
a. Displays X (in green background) or O (in red background) on the label clicked by the user, based on the player’s turn, and disable the clicked label in order not to allow changing it!
b. Checks for winner in rows, columns and diagonals
c. Displays “It was a tie!” in case of no winner.
d. Start a new game
e. Lists the winners of multiple plays of the game in a winnerListBox
f. Close the form and exit the application
Financial Accounting
ISBN: 9781618533111
6th Edition
Authors: Michelle L. Hanlon, Robert P. Magee, Glenn M. Pfeiffer, Thomas R. Dyckman