Question: C++ please help 4, write a OO C++ program to play the card game of war. There are two players in the game of war.
C++ please help


4, write a OO C++ program to play the card game of war. There are two players in the game of war. During a game, each player will have three piles of cards, named an unplayed pile, a war pile, and winnings pile, respectively. The game moves forward as cards move from the unplayed piles to the war piles and then to the winnings piles. The game ends when a player's unplayed pile has no more cards. At that point, the player with the largest winnings pile wins the game. Here are the rules for moving the cards: Each player is dealt 26 cards to his unplayed pile Repeat steps 3 through 5 until one or both unplayed piles becomes empty Each player plays the topmost card from his unplayed pile by placing it face up on his war pile If the cards have the same rank, repeat step 3. Otherwise, move both ware piles to the winnings pile of the player who has the card ofa higher rank at the top of his war pile The player with the largest pile wins 1. 2. 3. 4. 5. 6. The computer should make all the moves for both players and display the cards played on each move. Also, keeping track of the largest winning pile. The cards are dealt at start-up, updated to display the information on the cards played from each hand. When the game ends, announce the winner. Some classes that will be needed are specified below and additional classes can be used. It is up to the student to figure out what the responsibilities (methods) of each class will be. Those classes are War (object)- to represent the entire game. Creating a War object should start the game. Player (object)-to represent a single player
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
