Question: Need help with c++ program. Write a program that will implement the Vietnamese card game Bai Cao using a Cham deck of cards. The Cham

Need help with c++ program.

Write a program that will implement the Vietnamese card game "Bai Cao" using a Cham deck of cards.

The Cham deck is simple. Each card has a number from 0-9 and an animal image on it. The animal is either an elephant, monkey, rabbit, or bird.

Before the first game is played, the deck from the top down is ALWAYS arraged in smallest to largest number order corresponding to elephant, monkey, rabbit, and bird. Namely, from top, the card order is "0/elephant", "1/elephant"........."9/elephant", "0/monkey".........."0/rabbit"......."0/bird"........."9/bird"

For this program, for each shuffle, the deck to down is shuffled by swapping each successive pairs of card once. Namely, first card swaps the second card, third card with fourth card and so on. Next, the top 20 cards are swapped with the bottom 20 cards. Namely, cards 1-20 now become 21-40 and vise versa. For this program, the deck is only shuffled once.

The game is played by dealing 3 cards to each player.

Simply write two classes: Card and Deck. These 2 classes must be implemented using .h and corresponding .cpp files. Naturally the main function will use the classes to satisfy the specifications.

The rule of the game is not neccessary. All you have to do is ouput to the screen the deck before shuffling, the deck after shuffling and the cards dealt to three players aft shuffling. After that, add the numbers of all three cards together and the highest hand wins. If there are ties, all hands with highest number wins. Output to the wcreen which hand is the winning hand.

Example: If Hand 1 has 1/elephant, 0/rabbit, 5/bird, the hand is worth 6. If Hand 2 has 2/monkey, 9/monkey, 3/bird, it is worth 14 which is hight than 6 of Hand 1; therefore Hand 2 wins.

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 Databases Questions!