Question: in c + + : Project Topics: This project covers Linked Lists, Stacks, Queues, and Classes. How to Play Rupee: Overview: Rupee, based on 5
in c:
Project Topics:
This project covers Linked Lists, Stacks, Queues, and Classes.
How to Play Rupee:
Overview: Rupee, based on Rummy, involves matching cards by value or suit in sets or sequences to score points. The first player to points wins.
Setup: Each player is dealt seven cards from a shuffled card deck.
Turns: Players pick a card either from the deck or discard river lay down any possible matches, then discard a card.
Matches: Matches can be made by grouping cards of the same value numerical match or in sequence within the same suit sequential match
Cards are worth points, K are worth points, and Aces are worth points.
Round End: A round ends when one player has no cards left. Points are calculated from laiddown matches, while unplayed cards reduce the players score.
Game End: Normally, multiple rounds are played until a player reaches points. However, here, the winner is determined at the end of each round based on points.
Card Drawing Rules:
Players draw cards either from the deck or the discard river.
Drawing from the river requires taking all cards on top of the desired card. A risky play if the other player is close to emptying their hand.
Matches are scored and removed from play when laid down.
New Game Setup:
Deck: A standard shuffled deck of cards A four suits
Players: Two players start with seven cards each.
River: Discards grow in the river over time.
Game Requirements:
Only one game of Rupee with two players who share the playing device.
Each player aims to get rid of all their cards to end the game.
The winner is determined by points at the end of each round.
Use clear and modular code for all game functions, relying only on provided or created algorithms no external libraries
Card Syntax:
Card format: ValueSuit egAS for Ace of Spades, C for of Clubs.
Program Requirements:
Deck Structure: Store the card deck using a nodebased structure linked lists, stacks, or queues rather than dynamic arrays.
Player Hands: Use a nodebased structure for each players hand.
River: The discard river should also use a nodebased structure.
Function Requirements:
Card Pickup: Add cards to a players hand from either the deck or river based on game rules
Match Assessment: Check and lay down the highest scoring match in a players hand for points.
River Check: Evaluate the river to help players draw for a match and manage outofbounds input.
Game End Check: Verify hand emptiness and confirm if a discard action ends the game. Also, end the game if the deck runs out.
Point Tally: Sum points from laid matches, subtracting values from unplayed cards to declare the winner.
Discard Action: Allow players to discard a chosen card to the river, ensuring valid input.
Shuffle Function: Implement a shuffle function for deck randomization.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
