Question
PYTHON its a python and done in python only. Its a single assignment and please follow the instructions and also i have added code below
PYTHON
its a python and done in python only.
Its a single assignment and please follow the instructions and also i have added code below which is need to be complete where it says " your code here"
Please complete it and i will rate you. PLEASE DONT TELL ME ITS A BIG QUESTION BECAUSE I DONT LIKE TO WASTE MY QUESTION JUST GETTING AN ANSWER THAT QUESTION WAS TOO BIG. IT LOOKS BIG BUT I HAVE ALREADY DONE 90% OF THE WORK. YOU JUST HAVE TO A ENTER FEW LINES OF CODE. BELOW IS MY CODE AND IT SAYS THERE THAT "YOUR CODE HERE" YOU JUST HAVE TO CODE THAT AREA
75% of coding is already been done but where it says "your code here" you have to input the code there. Please do not change the code coz its right but you need to add a code where it says your code here.
1. Introduction In this exercise, we will use a data structure known as a LinkedDeque (deque implemented using linked list) to implement the card game Snap! 2. Objectives The purpose of this assignment is to help you *Sharpen your knowledge on basic data structures through an application .Refine your ability to translate real-world scenarios into code Note: Before you start, if you are not familiar with LinkedLists or Deques you are recommended to review the sample codes we covered in lecture first. 3. Background 3.1. Snap Card Game forward. The basic flow of our version of Snap is as follows: Snap is an easy-to-learn card game. Our version of Snap makes the game even more straight Step 1: Divide the deck into 2 halves (1 half per player; deck does not include Jokers) Step 2: While neither player has an empty deck, the two players take turns throwing a card into a public deck (which starts off as an empty deck). If a card is thrown that has the same rank as a previous card in the public deck, the player who threw that card takes the cards in the public deck up until (and including) the card of the same rank. Note: the cards thrown by each player can be from either the top or the bottom of their deck. We will determine whether the top or bottom card is thrown using randomness. Consider this example: suppose player A has the cards A, 2, Q, J, K, 5, Q, player B has the cards 3,2, Q,7, 4, and the public deck has the card 7, 5, 4, 1, 8 (this example is not with 52 cards, it is simplified for the sake of explanation). Player A randomly decides to throw the card that's on the bottom of his/her deck a Queen, which has not appeared thus far in the public deck (so the new public deck is 7, 5,4, 1, 8, Q) Then player B throws a 4 which has appeared in the public deck (now the public deck is 7,5,4,1,8, Q 4), thus player B takes the public deck up until and including the 4 and adds it to the bottom of his/her deck (4, 1, 8, Q,4-in exactly that order). After this one cycle of turns, player A has the cards A, 2, Q, J K, 5, player B has the cards 3, 2,Q,7,4, 1,8,Q,4, and the public deck has 7, 5 1. Introduction In this exercise, we will use a data structure known as a LinkedDeque (deque implemented using linked list) to implement the card game Snap! 2. Objectives The purpose of this assignment is to help you *Sharpen your knowledge on basic data structures through an application .Refine your ability to translate real-world scenarios into code Note: Before you start, if you are not familiar with LinkedLists or Deques you are recommended to review the sample codes we covered in lecture first. 3. Background 3.1. Snap Card Game forward. The basic flow of our version of Snap is as follows: Snap is an easy-to-learn card game. Our version of Snap makes the game even more straight Step 1: Divide the deck into 2 halves (1 half per player; deck does not include Jokers) Step 2: While neither player has an empty deck, the two players take turns throwing a card into a public deck (which starts off as an empty deck). If a card is thrown that has the same rank as a previous card in the public deck, the player who threw that card takes the cards in the public deck up until (and including) the card of the same rank. Note: the cards thrown by each player can be from either the top or the bottom of their deck. We will determine whether the top or bottom card is thrown using randomness. Consider this example: suppose player A has the cards A, 2, Q, J, K, 5, Q, player B has the cards 3,2, Q,7, 4, and the public deck has the card 7, 5, 4, 1, 8 (this example is not with 52 cards, it is simplified for the sake of explanation). Player A randomly decides to throw the card that's on the bottom of his/her deck a Queen, which has not appeared thus far in the public deck (so the new public deck is 7, 5,4, 1, 8, Q) Then player B throws a 4 which has appeared in the public deck (now the public deck is 7,5,4,1,8, Q 4), thus player B takes the public deck up until and including the 4 and adds it to the bottom of his/her deck (4, 1, 8, Q,4-in exactly that order). After this one cycle of turns, player A has the cards A, 2, Q, J K, 5, player B has the cards 3, 2,Q,7,4, 1,8,Q,4, and the public deck has 7, 5Step 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