Question: Using Java, please write a working program for the following prompt: Along with using queues (#8 in picture),The program MUST use a Single-Linked List somewhere.
B. Description We want to play a simple card game with 4 players option. The deck of cards contains 52 cards with 13 cards each in the 4 suits: clubs, diamonds, hearts and spades. Each player begins with 13 cards and one of the players starts the game by putting their first card on the table. In each round, players take turns by putting the top card from their hand on the table. The player who puts the card with the maximum value, gets all the 4 cards for that round. It can be assumed that the values for the cards are the card numbers, and 1 for Ace, 11 for Jack, 12 for Queen and 13 for King. If more than one player has the same value card, then the suit decides the winner of the round; clubs have more value than diarmonds, which in turn has greater value than hearts, and hearts have greater value than spades. The winner of each round gets all the 4 cards currently on the table and adds them at the end of the cards currently in his or her hand. Game continues until one player gets all the cards or for 15 rounds, whichever is earlier. If one player doesn't have all the cards before round 15, the player with the maximum number of cards at the end of 15 rounds is the winner. Construct the game using the following guidelines: l. Create a method to deal the deck of cards so that each player gets 13 random cards 2. Start the game by selecting a random player and move to other players in increasing order (or clockwise direction) and proceed in rounds; in each round all players put their first card on the table 3. Display what cards each player puts on the table 1. Show the cards on the table and in the hand of each player at the end of each round 5. 1 player wins cach round: in the next round the winner of the previous round puts the first card on the table 6. Continue the game for 15 rounds or until one player has all the cards 7. Declare the winner (the player with all the cards or the player with maximum cards after 15 rounds), or say its a tie! (when multiple players have equal number of cards after 15 rounds) 8. The cards on the table and in cach players hand must be stored using Queucs
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
