代写 C++ game AI Go MCD4720 – Fundamentals of C++

MCD4720 – Fundamentals of C++
Assignment 2 – Trimester 1, 2019
Submission guidelines
This is an individual assignment, group work is not permitted Deadline​: ​April 14, 2019, 11:55pm
Weighting:​ 15% of your final mark for the unit
Late submission:
● By submitting a ​Special Consideration Form​ or visit this link: ​https://goo.gl/xtk6n2
● Or, without special consideration, you lose 5% of your mark per day that you submit late
(including weekends). Submissions will not be accepted more than 10 days late.
This means that if you got ​Y marks, only (0.95n​ ​)×​Y will be counted where ​n is the number of days you submit late.
Marks:​ This assignment will be marked out of 100 points, and count for 15% of your total unit marks.
Plagiarism: It is an academic requirement that the work you submit be original. If there is any evidence of copying (including from online sources without proper attribution), collaboration, pasting from websites or textbooks, ​Zero marks may be awarded for the whole assignment, the unit or you may be suspended or excluded from your course. Monash Colleges policies on plagiarism, collusion, and cheating are available here​ or see this link: ​https://goo.gl/bs1ndF
Further Note: When you are asked to use Internet resources to answer a question, this ​does not mean copy-pasting text from websites. Write answers in your own words such that your understanding of the answer is evident. Acknowledge any sources by citing them.
1

Task Details:
This assignment consists of one main programming task. The purpose of this assignment is to get you comfortable with designing and implementing basic multi-class C++ programs. The task is detailed later in this assignment specification, as are the specific marks allocation.
Successful completion of the fundamentals of the task as described may obtain you up to a maximum of 80% of the total assignment marks. The last 20% of the mark will be allocated to additional functionality that you can design. This provides an opportunity for you to implement a feature of your choice and ensures that each student submission is suitably different. The additional functionality should demonstrate advanced or more complex application of principles covered to date. It need not be large amounts of work but should demonstrate a willingness to explore new and advanced concepts. You MUST detail what you have done in an accompanying “readme” file, otherwise markers may not be aware of the extra work undertaken.
Explicit assessment criteria are provided, however please note you will be assessed on the following broad criteria:
✓ Meeting functional requirements as described in the exercise description
✓ Demonstrating a solid understanding of object-oriented design and C++ coding, including
good practice
✓ Following the unit Programming Style Guide
✓ Creating solutions that are as efficient and extensible as possible
NOTE! ​Your submitted program MUST compile and run. Any submission that does not compile will be awarded zero marks. This means you should continually compile and test your code as you do it, ensuring it compiles at every step of the way.
If you have any questions or concerns please contact your tutor​ ​as soon as possible.
2

Assignment Task: Go Fish (Part B)
You are to implement the card game you started in Assignment 1 by creating an Visual Studio Project using your project plan as described in your previous submission.
Your completed Go Fish card game must demonstrate the following:
✓ You MUST implement your program using the following classes (as a minimum, you may include more if appropriate):
● Player class: holds the player’s details including their name, player number and score and a collection of cards.
● Card class:​ holds the card’s details including its rank, suit and unique card ID.
● Driver program: hold the main() function and controls the overall flow of the
game.
You may include other relevant attributes and behaviours to these classes, as identified in your project plan.
✓ The ​player​ must be able to do the following:
● assign a name which is requested at the start of the game and used in the feedback given
● see their hand of cards at the start of their turn so they can make an informed choice
● request a card, but only one that is the same as a card already in their hand
● continue asking for cards if successful in gaining a card from their opponent,
otherwise it becomes the opponent’s turn
✓ The ​opponent​ (computer) player must be able to do the following:
● be assigned a name at the start of the game and used in the feedback given – if you have multiple human players, names should be requested as per player above
● request a card, but only one that is the same as a card already in their hand – this can be just selecting a random card or you can add a more sophisticated form of AI
● continue asking for cards if successful in gaining a card from the player, otherwise it becomes the player’s turn
✓ The ​cards​ in the game should have the following characteristics:
● A unique rank, suit and ID
For example: ranks would be Ace through to King (A, 2, 3, …, J, Q, K), suits would be Hearts, Diamonds, Clubs and Spades (H, D, C, S), and IDs would be the combination of rank and suit (JH, AD, 2C, 10S)
✓ The ​game​ must check for the following conditions:
● All the criteria as stated in the game play description in Assignment 1.
● The player has run out of cards but there are some left in the deck so deal them
another hand of 7 cards or however many are left.
3

● All cards in both the deck and the players’ (human and computer) hands are gone which ends the game.
● The human player should be able to QUIT the game at any time.
● The game continues until all sets of cards are formed. The player with the most
points wins.
Extra Functionality
The marking criteria indicates that you should make some individual additions to this in order to achieve the final 20% of the mark.
Following is a list of additional features you can include. You may implement one or more features from the list, but you will only be able to score a maximum of 20% of the marks.
● The player can set the number of cards in the initial hand dealt (for example 3, 5, 7, or a random number from 3 to 7)
● Making different sets of cards worth different points.
● Display the cards using ASCII art.
● Allow the game to be saved and restored at the player’s request.
● Allow the game to be played with more computer players. The player can select the
number of opponents to play against. The player should be able to select the computer player to ask for a card and the computer opponents should randomly select which “player” to ask.
● Create a Hand class to hold all the details of each player’s hand of cards. The Hand must incorporated into the Player class.
● Implement a more sophisticated AI for the computer players. The computer players should be able to track which cards have been asked of them and to be able to make reasonable intelligent choice when asking the human and/or other computer player(s) for a card.
You certainly do not have to implement all of the above to earn marks for extra functionality. Just remember the maximum marks you can earn are given below in ​Extra Functionality section.​ It is up to you!
Assignment 2: Marking Criteria [up to 100 marks in total]
Does the program compile and run? Yes or No
● A non-compiling program will receive an automatic ​50 marks penalty. Class Design [15]
● Player Class ​[5]
○ Has an appropriate header file ​[2]
○ Required data members and member functions using meaningful names ​[1]
○ Contains only aspects that relate to a “player” (has no data members or member
functions that are not directly related to a Player) ​[2]
4

● Card Class ​[5]
○ Has an appropriate header file ​[2]
○ Required data members and member functions using meaningful names ​[1]
○ Contains only aspects that relate to an “card” (has no data members or member
functions that are not directly related to a Card) ​[2]
Functionality [45]
● Game set up including: creating and shuffling the deck of cards, initialising the player and game variables, dealing cards to each player, etc. ​[8]
● Implementation of displaying a clear and uncluttered User Interface ​[5]
● Appropriate game dialog for the player ​[5]
● Implementation of successful action processes ​[8]
● Implementation of appropriate responses to player’s interactions ​[7]
● Appropriate feedback displayed to the player ​[7]
● Appropriate end game conditions triggered​ [5]
Quality of Solution and Code [20]
● Does the program perform the functionality in an efficient and extensible manner? ​[12]
○ Appropriate use of functions and function calls ​[6]
○ Appropriate use of data types ​[3]
○ Appropriate use of decisions, loops and other programming techniques ​[3]
● Has a well-designed OO program been implemented? ​[4]
● Has the Programming Style Guide been followed appropriately? ​[4]
Extra Functionality [20]
● The player can set the number of cards in the initial hand dealt ​[3]
● Making different sets of cards worth different points ​[4]
● Display the cards using ASCII art ​[5]
● Allow the game to be saved and restored at the player’s request ​[5]
● Allow the game to be played with more computer players ​[10]
● Create a Hand class to hold all the details of each player’s hand of cards ​[10]
● Implement a more sophisticated AI for the computer players ​[10]
Driver ​[5]
● Game
○ Has appropriate variables and functions using meaningful names ​[3]
○ The main() function has appropriate function calls to keep it uncluttered ​[2]
5

Submission Instructions:
A zip file containing your Visual Studio project and any associated documentation files (readme, if required) must be compiled and uploaded to the Moodle site. Your code MUST be submitted as a Visual Studio project to facilitate ease of assessment and feedback.
The assignment must be created and submitted as a Visual Studio 2017 project. You may complete the exercises in your preferred IDE, however you should create a Visual Studio project in order to submit.
Files to be submitted:
One Visual Studio Project (2017) called “​YourFirstNameLastNameID​”, contentis all the required files.
You need to make sure there are no spaces in the source filenames. Zip the folder under the same name and submit it to moodle.
NOTE! ​Your submitted files must be correctly identified (as described above). Any
submission that does not comply will receive an automatic 20 marks penalty
(applied after marking).
6