Code a simple kids card game using only C++ programming. (only C++ libraries & c++11 standard)
$10-30 USD
Completed
Posted over 7 years ago
$10-30 USD
Paid on delivery
My Ship Sails is a great kids card game. Read ([login to view URL]) to understand the rule to play. The mission of the game is to collect 7 cards of the "same suit" you choose. You can sail out your ship if you have 7 cards of the same [login to view URL] card numbers are unrelated in this game.
You need to pass one unnecessary card to your neighboring player, like a clockwise turn agreed by all players. So, others do in the same way at the same time.
In this assignment, you are going to play with other 4 family members and you are to pass out your unnecessary card to player 1, and then player 1 passes one card to player 2, and so on. That means that you are player 0 and you will be passed the 7th card from player 4.
You can see all of your 7 card set. You are given a choice to pick one card among 7 to pass out player 1. The players 1 through 4 will do the same thing with some intellectual ability in that each of them will choose the most unlikely card (i.e., the minimum number of occurrences of suit) to pass to the next player. My son played with my implementation for one hour to finally give up... Can you win?
The implementation needs to show which card is passed among the players (as a hint). Also typing '?' will show all the players' cards (as a cheating). The game ends if any of 5 players won by collecting the seven cards of the same suits. Your implementation must show the hands of other players in the game end.
Implementing this game is not hard if this is done properly in our learned object-oriented way: note that a card is a structure of number and suit, a player has a vector of card, and the game has a vector of cards as well as a vector of players. See the next example game session. For instance, SJ means "Jack of Spades."
A demo of the game is attached here as well. Codes should be well commented with efficient coding.