Question
In this program we will always assume only two players will play. This means each player will represent its own linked list (thats right two
COP3502C Computer Science 1 Dr. Andrew Steinberg Spring 2022 Programming Assignment 3 The Card Game of War Max Points 100 Due: 3/14/2022 at 11:59pm Background Story of this Assignment You have just learned your first elementary data structure (woohoo!). Something that I stressed in lecture that you will see throughout your CS classes is that many data structures can be derived from the linked list. Therefore, I believe the first data structure programming assignment should revolve around the linked list for many reasons. One reason is that you will get the chance to apply the linked list in an application scenario. Another reason and perhaps one of the most important ones is that you will get a fundamental understanding of implementing data structures in C by coding up linked lists. Have fun and start early (seriously start early)! Make sure to see the TAs and ULAs for help! Assignment Details For this programming assignment, you will get to simulate the classic card game war using a singly linked list. Rules for the game can be found at this website: https://gamerules.com/rules/war-card-game/ In this program we will always assume only two players will play. This means each player will represent its own linked list (that’s right two separate linked lists). As the rules state there are a total of 52 cards. The following number list shows each set of cards in the deck. Each type contains 4 (?, ?, ?, and ?) cards (hence 4*13=52 cards total). 1. Ace 2. King 3. Queen 4. Jack 5. 10 6. 9 7. 8 8. 7 9. 6 10. 5 11. 4 12. 3 13. 2 Also, the order presented shows the order of card dominance (top being the highest and bottom being the lowest). This will determine which player wins after cards are drawn. For example, if Player A draws the card king of hearts and Player B draws the card 9 of clubs, then Player A wins that round. As a result, Player A takes its own card drawn and Player B’s card and puts it in the back of the pile (sounds...
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started