Assignment



AssignmentCreate a Windows forms application that allows the user to play Tic-Tac-Toe. The game has two players, designated as X and O. Use drop-shadows to give the game an elementary 3-D appearance. Two sample game screenshots follow. The one on the left shows a context menu and the one on the right shows a cursor in the lower right square indicating it is X’s turn and a left mouse-click at this point will select that square for X. SpecificationsThe following specifications give more detail about the assigned application.The window should be resizable, and the application should redraw the game board correctly whenever it is resized.The X and O should be drawn using appropriate colors.The cursor should take the form of an X when it is X’s turn to play and it should take the form of an O when it is O’s turn to play. The cursor should be the default cursor when the game is not in progress (e.g., when a winner has been declared).The form should have a right-click context menu that allows the user to do at least the following things:Clear the board (an internal management tables) to restart the gameEnd playDisplay an appropriate About Box that fills itself with information about the game, primarily gathered from AssemblyInfo.cs. The About Box should include a graphic (other than an Icon) It should not merely be MessageBox The About Box should be a secondary formOther menu entries may be added to the context menu to allow other interesting functionality.The application should have a colorful and appropriate splash screen (secondary form) that is displayed for a reasonable amount of time and closes itself.All forms should center themselves on the screen.The game should accurately determine a winner or a tie. A winner should be recognized as soon as one player has “3-in-a-row” horizontally, vertically, or diagonally. A tie is recognized if all squares have been selected without a winner.The game should notify the users when a player wins or when there is a tie.When a winner exists or there is a tie, the game should end with no more plays allowed.A goodbye message should be displayed when the game ends.Bells and WhistlesYou are welcome to add extra features. The extras may range from having the computer play the “O” in some intelligent and challenging manner to improved graphics to tracking the number of games played, how many wins each player has, and providing a scoreboard. Any extras that make the game more interesting are welcome.HintsIt is necessary to manage the state of the game as well as the state of the form concurrently. For example, it is important to be able to determine in which square a user clicks, whether that square is already selected, and so forth. Since the user may resize the game board, this process is dynamic. In addition, it is necessary to be able to determine whether there is a winner or a tie at each stage of the game. The following diagram suggests some one and two dimensional arrays that may be useful in the process.SubmissionZip the entire solution folder into a file named HW3yourname.zip, and submit it through the OIT Dropbox as you did with the previous homework assignments. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download