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 cards, but you cant see the other players card until, you type in ? in the command and which is like a cheat sheet for the player playing the game. To win the game the player must have all of the 7 same suites.
A demo and a better explanation is attached to the file below.
Hello I am an expert C/C++ programmer of 10+ of years of experience. Below you can find class definitions for a sample implementation.
Best Regards
struct Card {
int suit; // HDCS
int number; // A234567890JQK
};
class Player {
protected:
int selfIndex; //index within player vector, starting with 0 for the human
int takeFrom; //player supplying new Card
vector<Card> hand; //holds 7 cards
Card discard; //card being discarded
int discardIndex; //position within hand of card being discarded
static Card discardList[];
public:
Player(int index); // initialize player with player index
virtual void chooseDiscard(int);
void replenish();
void add_card(Card card); // add card to hand (for initial distribution)
};
class AutoPlayer : public Player {
virtual void chooseDiscard(int);
};
class Deck {
vector<Card> cards;
public:
Deck(); // initialize the deck
void shuffle(); // shuffle the cards
void distribute(vector<Player*>& players); // distribute 7 cards to each player
};
$25 USD në 1 ditë
4,8 (5 përshtypje)
2,3
2,3
5 profesionistët e pavarur ofrojnë mesatarisht $28 USD oferta për këtë punë
Hi there,
Quite an interesting problem you got there.
I've completed the task using OOPs concepts and can deliver it immediately.
Why should you choose me?
- I can deliver immediately.
- I'm a OOPs expert (Secured an A grade) and very proficient in C++ (Modern C++).
- I use C++ on a daily basis, you can check my GitHub profile to know about
some of my interesting projects.
Look forward to interacting with you soon.