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 500 Rummy, involves matching cards by value or suit in sets or sequences to score points. The first player to 500 points wins.
Setup: Each player is dealt seven cards from a shuffled 52-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 3-4 cards of the same value (numerical match) or in sequence within the same suit (sequential match).
Cards 2-9 are worth 5 points, 10-K are worth 10 points, and Aces are worth 15 points.
Round End: A round ends when one player has no cards left. Points are calculated from laid-down matches, while unplayed cards reduce the players score.
Game End: Normally, multiple rounds are played until a player reaches 500 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 52 cards (2-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], e.g.,[AS] for Ace of Spades, [10C] for 10 of Clubs.
Program Requirements:
Deck Structure: Store the 52-card deck using a node-based structure (linked lists, stacks, or queues) rather than dynamic arrays.
Player Hands: Use a node-based structure for each players hand.
River: The discard river should also use a node-based 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 out-of-bounds 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!