Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PART A:Linkedlists (50 marks) The card game 99 (Ninety Nine is a simple turn-based multiplayer game, where each player takes a turn playing a card

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
PART A:Linkedlists (50 marks) The card game 99 (Ninety Nine is a simple turn-based multiplayer game, where each player takes a turn playing a card from their hand, and add the value of the card to the running total The player who causes the total to go over 99 loses the round. Create a program that simulates around of 99 Players are dealt 3 cards. The point total starts at zero and each card adds its face value in points fexample: a 5 is worth five points, a face card is worth 10 points except for certain cards that have special values or meanings: . Ad reverses play and does not change the total number of points) A9 is a pass (and does not change the total number of points) A 10 subtracts 10 points from the total A King takes the point total to 99 for keeps it 99 the total is already 99) An Ace adds either 1 or 11 points, announced by the player who plays it After each card is played, the player announces the new total to the table and drama replacement card Each player must playa card without sending the total number of points higher than 99 . a player cannot play a card that keeps the total or less than that player loses a token and the round ends 1. Develop a generic CircularDoublyLinkedlist . Use the circularly and doubly linked in classes from our notes as a basis Start with the DLL and think of how it can work circularly Sentinels are not required, only a reference to the last nede Node will have references to the next and previous nedes addietween and remove il private utilities will be used, al adding and removing will work like doubly A boolean field, IsForward, represents the direction of rotation Your Circular Doublelinkedlist class will support the following public methods: Returns the number of elements in the list. sty) Returns true it the list is empty, and faise otherwise first Returns (but does not remove the first element in the list Lasto Returns (but does not remove the last element in the list. addette) Adds a new element to the front of the list addLante Adds a new element to the end of the list removesti Removes and returns the first element of the list renoveLaN) Removes and returns the last element of the list. PART A:Linkedlists (50 marks) The card game 99 Ninety Nine) is a simple turn-based multiplayer game, where each player takes a turn playing a card from their hand, and adds the value of the card to the running total The player who causes the total to go over 99 loses the found Create a program that simulates around of 99 Players are dealt 3 cards. The point total starts at zero and each card adds its face value in points fexample: asis worth five points, a face card is worth 10 points except for certain cards that have special values or meanings . Ad reverses play and does not change the total number of points) A9 is a pass (and does not change the total number of points) A 10 subtracts 10 points from the total A King takes the point total to 99 for keeps it 99 the total is already 99) An Ace adds either 1 or 11 points, announced by the player who plays it . After each card is played, the player announces the new total to the table and drama replacement card Each player must play a card without sending the total number of points higher than 99 . a player cannot play a card that keeps the total or less than that player loses a token and the round ends 1. Develop a generic CircularDoublyLinkedList - Use the circularly and doubly linked in classes from our notes as a basis Start with the DLL and think of how it can work circularly Sentinels are not required, only a reference to the last nede Node will have references to the next and previous nedes adidietween and remove il private utilities will be used, al adding and removing will work like doubly - A boolean field, 1.Forward, represents the direction of rotation Your CircularDoublelinkedlist class will support the following public methods: size Returns the number of elements in the list. Lampty Returns true the list is empty, and faise otherwise first Returns (but does not remove the first element in the list Lasto Returns (but does not remove the last element in the list. addette) Adds a new element to the front of the list addlaste Adds a new element to the end of the list renovesti Removes and returns the first element of the list renovetat) Removes and returns the last element of the list. Flayer to the player amandan aytist af Cards as their hand Indude a method to play a cards and remove card from the han dan dess that runs theme Note- most of the work will be done at Brould have minimal code declarete commence, adine gor play Ceyda olen Deck of card thering totale Upon instantation de test of players are players for your demande de heffend deal 3 cards to each playet Begin the player in the Each player wiltrove their turn when poste at the heat of the tot Notes Uwe enhanced us to the worstand special contrough this the player planen ACE race them to the mund When faced with possibly going over the player to play a card that prevents them from otherwise and can be - Note in the sample of the hand is played Te format output include a Springfield venide the num's toine Uwe unicode valor hearts and diamondspectively Sample output piaye 10 Matatanda. in playe and: ut plays 10. To plays Pubs play Pilata, Tiba Sunt plays 10. The total -10 Se plays Ty. al's hands plays IT hand S., tuba plays S. Seeway Tes The totale the tutti Simply wale Timo le e plays The total 99 Watepleys The tatal 104 th PART A:Linkedlists (50 marks) The card game 99 (Ninety Nine is a simple turn-based multiplayer game, where each player takes a turn playing a card from their hand, and add the value of the card to the running total The player who causes the total to go over 99 loses the round. Create a program that simulates around of 99 Players are dealt 3 cards. The point total starts at zero and each card adds its face value in points fexample: a 5 is worth five points, a face card is worth 10 points except for certain cards that have special values or meanings: . Ad reverses play and does not change the total number of points) A9 is a pass (and does not change the total number of points) A 10 subtracts 10 points from the total A King takes the point total to 99 for keeps it 99 the total is already 99) An Ace adds either 1 or 11 points, announced by the player who plays it After each card is played, the player announces the new total to the table and drama replacement card Each player must playa card without sending the total number of points higher than 99 . a player cannot play a card that keeps the total or less than that player loses a token and the round ends 1. Develop a generic CircularDoublyLinkedlist . Use the circularly and doubly linked in classes from our notes as a basis Start with the DLL and think of how it can work circularly Sentinels are not required, only a reference to the last nede Node will have references to the next and previous nedes addietween and remove il private utilities will be used, al adding and removing will work like doubly A boolean field, IsForward, represents the direction of rotation Your Circular Doublelinkedlist class will support the following public methods: Returns the number of elements in the list. sty) Returns true it the list is empty, and faise otherwise first Returns (but does not remove the first element in the list Lasto Returns (but does not remove the last element in the list. addette) Adds a new element to the front of the list addLante Adds a new element to the end of the list removesti Removes and returns the first element of the list renoveLaN) Removes and returns the last element of the list. PART A:Linkedlists (50 marks) The card game 99 Ninety Nine) is a simple turn-based multiplayer game, where each player takes a turn playing a card from their hand, and adds the value of the card to the running total The player who causes the total to go over 99 loses the found Create a program that simulates around of 99 Players are dealt 3 cards. The point total starts at zero and each card adds its face value in points fexample: asis worth five points, a face card is worth 10 points except for certain cards that have special values or meanings . Ad reverses play and does not change the total number of points) A9 is a pass (and does not change the total number of points) A 10 subtracts 10 points from the total A King takes the point total to 99 for keeps it 99 the total is already 99) An Ace adds either 1 or 11 points, announced by the player who plays it . After each card is played, the player announces the new total to the table and drama replacement card Each player must play a card without sending the total number of points higher than 99 . a player cannot play a card that keeps the total or less than that player loses a token and the round ends 1. Develop a generic CircularDoublyLinkedList - Use the circularly and doubly linked in classes from our notes as a basis Start with the DLL and think of how it can work circularly Sentinels are not required, only a reference to the last nede Node will have references to the next and previous nedes adidietween and remove il private utilities will be used, al adding and removing will work like doubly - A boolean field, 1.Forward, represents the direction of rotation Your CircularDoublelinkedlist class will support the following public methods: size Returns the number of elements in the list. Lampty Returns true the list is empty, and faise otherwise first Returns (but does not remove the first element in the list Lasto Returns (but does not remove the last element in the list. addette) Adds a new element to the front of the list addlaste Adds a new element to the end of the list renovesti Removes and returns the first element of the list renovetat) Removes and returns the last element of the list. Flayer to the player amandan aytist af Cards as their hand Indude a method to play a cards and remove card from the han dan dess that runs theme Note- most of the work will be done at Brould have minimal code declarete commence, adine gor play Ceyda olen Deck of card thering totale Upon instantation de test of players are players for your demande de heffend deal 3 cards to each playet Begin the player in the Each player wiltrove their turn when poste at the heat of the tot Notes Uwe enhanced us to the worstand special contrough this the player planen ACE race them to the mund When faced with possibly going over the player to play a card that prevents them from otherwise and can be - Note in the sample of the hand is played Te format output include a Springfield venide the num's toine Uwe unicode valor hearts and diamondspectively Sample output piaye 10 Matatanda. in playe and: ut plays 10. To plays Pubs play Pilata, Tiba Sunt plays 10. The total -10 Se plays Ty. al's hands plays IT hand S., tuba plays S. Seeway Tes The totale the tutti Simply wale Timo le e plays The total 99 Watepleys The tatal 104 th

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 2 Lnai 9285

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Joao Gama ,Alipio Jorge ,Carlos Soares

1st Edition

3319235249, 978-3319235240

More Books

Students also viewed these Databases questions

Question

What is meant by Career Planning and development ?

Answered: 1 week ago

Question

What are Fringe Benefits ? List out some.

Answered: 1 week ago