美文网首页
C#代写Mandatory Tic-Tac-Toe代写data

C#代写Mandatory Tic-Tac-Toe代写data

作者: fujianjia | 来源:发表于2019-08-24 17:20 被阅读0次

& Lab PurposeThis lab will give you practice creating Windows Forms Applications, menus, drawing.You should work in your groups (2 members). If your partner is not present in class each will need to complete the assignment on your own by the due date/time.Always bring to classDeitel’s book.This assignment grade sheet for this lab already printed out.USB Flash drive(s) or other storage media.Your laptop with Microsoft Visual Studio 2015.Mandatory InstructionsIn this assignment you will implement the TicTacToe game as a Windows application. The game will allow two humans to play each other, with the computer displaying the playing grid and the results. When the form initially loads, it looks like the diagram on the left below. After three moves it would look like the diagram on the right.Your form should be set so that it can’t be resized. The only controls in this form are one label (initially displaying “O’s turn”) and one menu containing two items (Reset, Exit). The grid must be perfectly square. I made my grid boxes 50 dialog units wide/tall. It should start just below the label and a little to the right of the left border of the window. Creating the grid may be a bit of a trial and error exercise.In order to support n-tier application design, define a class called Game that contains all of the TicTacToe logic. The form will capture the click events and other events and pass them to functions in the Game class. Below are examples of some methods, properties, fields for the Game class.You will also want to create an abstract Shape class with derived classes for the X character, and the O character.All of these classes will need access to the Graphics context of the form, so I suggest that you define a public static Graphics reference in the Shape class. This should be initialized by Form1_Load().For the mouse up event, you will want to send the coordinates to a Game function that makes the next move. Ignore any mouse click that doesn’t fall within one of the nine squares of the grid, and ignore any mouse click involving the right mouse button. The function that makes the next move returns a string response, and that string should be put into the label on the form. Some possible messages are:Oapos;s turnXapos;s turnSquare already occupied--choose anotherItapos;s a tie!Xapos;s win!Oapos;s win!Here are some hints:You will want to define data structures containing all of the objects drawn on the form, so that they can be redrawn as necessary for Paint events of the form. For example, the Game class will probably have a 3x3 array of type Shape to hold all of the X’s and O’s on the form. The Paint event handler for the form will call a function of the Game class that redraws everything.The abstract class called Shape will have an abstract method called Draw. The Draw function should take four arguments, representing upper-left and lower-right rectangle coordinates. If you prefer, Draw could accept only one argument of type Rectangle (a .NET class).You will also want to save the coordinates of each square in a 3x3 array so that these are readily available for calls to Draw for the X’s and O’s. This array of coordinates can also be used to determine which square a mouse click falls in. You might want to use the system class Rectange to save these coordinates. I created my own Coordinates class to represent the two points in the plane.The Reset menu command should return the playing grid to its initial state. It should also change the label to say “X’s turn”. You might need to call the Invalidate() function from the event handler for this menu item to force the screen to be redrawn.Once someone has won the game, ignore all further mouse clicks on the form until the game is reset. Do not allow two clicks into the same grid square, do not increment moves when that happens. Don’t forget to recognize a tie game and display an appropriate message. It is sufficient to keep track of how many moves have been made and declare a “tie game” after nine moves (although you can get more fancy than this if you like).For this assignment, make a custom icon for your application by editing the App.ico file. Your icon might look something like this, but feel free to be more creative:Extra Credit: Change the form so that it can be resized while the program is running. Then redraw the grid and the X’s and O’s to fill the resulting form. This is worth up to three points of extra credit.Code DocumentationEach of your source files should contain a documentation header with description, author name, class information (CS3160). Each function should have a documentation header with minimally function name, description, parameters, return value. Use proper program style at all times which means indentation, alignment, and whitespace. Utilize self-documenting code which means use mnemonic, i.e., meaningful variable/function/namespace/class names, etc.What to turn in?Submit compressed (.zip) solution folder via Canvas.In your solution folder make sure that all necessary files to compile/link/execute your projects are provided.Here are some files that may be required…All required C# source files (.cs)makefile (if the solution requires it)The entire Visual Studio 2015 solution folder (if the solution requires it)本团队核心人员组成主要包括BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp

相关文章

网友评论

      本文标题:C#代写Mandatory Tic-Tac-Toe代写data

      本文链接:https://www.haomeiwen.com/subject/eguqectx.html