Question: IIn C++ using a stack class (using a linked list or array) create a card game program. The game must programmed and played as followed:
IIn C++ using a stack class (using a linked list or array) create a card game program. The game must programmed and played as followed:
1) There is only one deck of cards with 50 cards in it. Each card has a vaule of 0-5. (Must use a stack for deck of cards. Cards must be randomized using a random # fucntion and the stack must be bult using the stack push function )
2) The game requires two players.
3) Cards are drawn off the top of the deck.
4) How cards are played:
If a card with a vaule of 0 is drawn, player gets minus 5 points and their turn is over.
If a card with a vaule of 1 is drawn, players gets 1 ppont and gets to draw again.
If a card with a value of 2 is drawn, player gets 2 points and a random card is put back on top of the deck and their turn is over.
If a card with a vaule of 3 to 5 is drawn, player gets the points and their turn is over.
5) First player to 50 wins! (If the deck of cards runs out, add another 50 cards)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
