Question
Answer the following based on information provided after the question. When reviewing the game of Three Card War how would we break down the game
Answer the following based on information provided after the question.
When reviewing the game of Three Card War how would we break down the game into it's basic elements?
What C++ classes would we need to implement the game?
Identify these basic classes, choose a class and describe how you might implement the .h file with the appropriate member functions for the class.
Three Card War
The card game Three Card War is a simple card game for two players. The game uses a 52 card conventional deck. To begin the deck is shuffled and each player draws three cards. The players may look at their three cards. The remaining cards are placed in a pile facedown between the two players. The players decide who is going first.
The player going first selects one of his three cards and places it faces up.
The opposing player selects one of her three cards and places it faces up.
If the ranks of both cards are the same (a push), then both players retain their cards and set them aside. Otherwise, the player with the highest-ranking card keeps both cards (again, setting them aside)
After playing the round, each player draws one card from the deck to replace the card just played with the first playing drawing first.
The player that won the round is now the first player for the next round unless there was a push then the original first player goes frst again.
The game ends when the deck is exhausted and both players have played all of their three cards
. The player with the most cards set aside wins. Card ranking begins with the 2 as the lowest card going up to the ten, then jack, queen, king, and ace.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started