Introduction由于不能使用循环,所以需要将依次判断的这种判断过程改为递归的过程简单的理解下来就是把循环的过程变为函数迭代的过程注意:Checkmate也就是将军,存在多种可能,按照题目要求只要输出其中一种即可以这个最复杂的功能为例处理过程就是依次尝试在每个可以落子的点尝试落入所有可能的大小,然后判断这个状态是够为将死对面(就是可以放的最小块没地方可以放),判断完成后需要把各个状态恢复,比如棋盘的落子情况以及可使用块的剩余数量10/29/2017 COMP2011 Assignment 2: Number Blocks Game1/2Assignment 2: NumberBlocks GameMENUIntroductionDescriptionDownloadSubmission and DeadlineFAQFAQ updated: 24/10/201719:13pmINTRODUCTIONfrom In this assignment you are asked to implement a game simulating the toddler toy shown above. The game inventor,Kevin, invented this game with his son and daughter. The idea of this game is that two players take turn to put ablock into a 10unit by 10unit game board. If a player fails to put any block into the game board, the player loses.If all blocks are fitted in the game board, the game ties.The objective of this assignment is to provide an opportunity for students to practise recursion and char array.Therefore, all tasks in this assignment should only be completed using recursion. You are not allowed to use anyloops (forloop, whileloop, dowhile) nor more advanced memory management techniques or data structures likestack or queue anywhere in the functions you are asked to complete. String class is also not allowed.There are four tasks; read the instructions carefully before you start. You must finish this assignment with theprovided skeleton in the pa2.cpp file. Create a standard Eclipse C++ project (MinGW gcc or MacOSX g++) and addthe pa2.cpp file to it. Your task is to complete all the missing function implementations in the source file. The sourceWeb view Printable view Course homepage ++ Font size ‐‐ Font sizC++代写 Assignment 2 Number Blocks Game帮做C/C++编程作业eCOMP2011Introduction to ObjectOriented Programming10/29/2017 COMP2011 Assignment 2: Number Blocks Game2/2file is fully documented and it describes the exact requirements that you have to complete for each function. Youshould seek clarification from the TA via facebook, email, or in person if you have any doubt about thespecification.For submission details, please refer to the Submission and Deadline page.TIPSYou should read this tips after you have read the other parts of the assignment, including the skeletoncode. We put it here to avoid that you miss it accidentially. Make sure you do:Have a return statement on every possible return path of your function. Sometimes yourfunction will behave properly even if you have missed a return statement. Our experience toldus it does not work when we grade it.Check array outofbound properly. There are four walls in the game board and it sometimesmight also work even if your boundary checking code is wrong. Again, our experience told us itdoes not work when we grade it.Do not write any code in the main function. You are required to complete four requiredfunctions and you can create some helper functions (which contain no loops) as well. However,you cannot write any code in the main function. Any code in the main function will be discardedwhen we grade it.Submit only the pa2.cpp but not a zip, exe. We don’t grade submissions with incorrect formats.Submit your program at least one hour before the assignment is due. The traffic (and your luck)will be very bad in the last hour before due time. You can submit an assignment multiple timesand we grade only the last one.slide for tutorial sessionPage maintained by Kevin Wang | Course homepage转自:http://ass.3daixie.com/2019030313745561.html
讲解:C++ Assignment 2 Number Blocks GameC/C++
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- Introduction由于不能使用循环,所以需要将依次判断的这种判断过程改为递归的过程简单的理解下来就是把循环的...
- 假如消费者安贫乐道,厂商们都得饿死,数码圈的频繁“大换血”,皆因我辈喜新厌旧。今天我点评这款智能手环名为黑加,它的...