Cancelled

C++ Programming Card Deck

Write a C++ program that plays the card game of Hearts. The C++ program should include your overloaded < operator, sort function, and shuffle function.

The program must have these features:

• Four hands only

• At least three classes – Card, Deck, and Player.

• Use the try-throw-catch statements when a player tries to play an incorrect card, such as not following suit on a trick (see rules of the game).

Please keep the main program simple. Most of our logic should be in member functions for classes.

The display should look something like this:

HAND 1 HAND 2 HAND 3 HAND 4

---------- ---------- ----------- -----------

3 points 11 points 2 points 0 points

----------- ----------- ----------- -----------

Spade Ace Spade 5 Heart 7 Spade 10

Spade 2 Heart Jack Diamond Ace Spade 4

Heart Queen Club 10 Diamond King Heart 2

Heart 4 Club 3 Diamond Queen Diamond Jack

Diamond Jack Club 2 Club 9 Diamond 8

. . . .

. . . .

. . . .

CURRENT PLAY:

Club 4 Club Queen enter card:

Object of the Game

The player with the lowest score wins.

Scoring

At the end of each game, players count the number of hearts they have taken as well as the queen of spades.

A total of 26 points are awarded:

• Each heart counts as 1 point

• Queen of spades counts as 13 points

When one player takes all 13 hearts and the queen of spades, instead of losing 26 points, that player scores zero and each opponent scores 26 points. This is called ‘shooting the moon’.

The Deal

There are four players, each with 13 cards initially. Players sit around a table. To deal, start with any player and deal cards one at time clockwise.

The Play

Play proceeds in rounds, in which each player plays one card, in clockwise order around the table. Playing the first card of a round is called ‘leading’. The player holding the 2 of clubs leads the first round. Subsequently, the winner of one round leads the next round.

Following the first card of a round, the remaining players must play a card in the same suit. A player with no cards in this suit may play a card in any other suit. The highest card of the suit that was led wins the round. The winner of a round and accumulates points for the queen of spades or any hearts.

Rounds are sometimes called ‘tricks’.

Challenge 1

Enable games with three or five players.

Challenge 2

Implement these three special rules of play:

• After cards are dealt but before the first trick, each player selects three cards and passes them to the player on the right (clockwise).

• If a player has no clubs when the first trick is led, a heart or the queen of spades cannot be discarded.

• Hearts may not be led until a heart or the queen of spades has been discarded. (The queen of spades can be led at any time.)

Skills: C Programming, C# Programming, C++ Programming, Java, Software Architecture

See more: deck of cards vector c++, c++ program to shuffle deck of cards, c++ card shuffling and dealing program, c++ card game code, deck of cards c++ array, c++ deck of cards struct, generate a deck of cards in c++, create a deck of cards c++, c programming to write a programme to find out the sum of different series, write a c++ programming fuly employe salery gender ageadd node at start, write some software using c programming, java code card deck display, card deck java using array, triad card deck, output card deck source code java, programming project deck shuffle, sql table assign card deck user, simple card deck gui java, programming card game iphone, iphone programming card game

About the Employer:
( 0 reviews ) United States

Project ID: #15772829

10 freelancers are bidding on average $31 for this job

Yknox

Hello, I'm Smile Song, developer in China. I'm interesting your project very well I'm a Good SQL, C++, c#, Python, .Net, swift, object-c, OpenCV, Math, Java, Algorithm expert. Relevant Skills and Experience I m quite More

$23 USD in 1 day
(923 Reviews)
9.2
liangjongai

Hi! I'm interesting your project very well. I am mastering c++ and I'm a good Mathematician. And also I have many experience and good skill about algorithm. Let's go ahead with me Stay tuned, I'm still working on th More

$30 USD in 1 day
(324 Reviews)
7.7
it2051229

Hi there, I went through the requirements and I would like to do this project if given the opportunity. Let me know if you are interested. Thanks. Relevant Skills and Experience C++ Programming Proposed Milestones $3 More

$30 USD in 1 day
(1562 Reviews)
7.9
hbxfnzwpf

120usd for this project Relevant Skills and Experience I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 6 years. My work is online game developing, and ma More

$120 USD in 2 days
(159 Reviews)
7.1
$30 USD in 1 day
(8 Reviews)
3.6
athulskarun

Hello Sir. I have 4 years experience in C++ and Java Proramming. I can provide 100% quality work within the deadline at a very low rate. Relevant Skills and Experience C++ Programming Proposed Milestones $10 USD - More

$10 USD in 1 day
(5 Reviews)
2.8
tutorsonlinehub

Lets chat and discuss about the work and price. No need to pay anything upfront first check the work and if you happy with work then pay me. You can pay me lowest price. Thanks Relevant Skills and Experience 12 Year More

$12 USD in 1 day
(7 Reviews)
2.4
Shakeel11rt

[login to view URL]

$10 USD in 3 days
(0 Reviews)
0.0
ssi599a5dc458c8b

Let’s chat and discuss about price and work. 12 years experience in same filed you will get 100% correct work. No need to pay upfront money first check work quality and if you satisfied then pay. Relevant Skills and E More

$20 USD in 1 day
(0 Reviews)
0.0
zohaibasghar729

I have expert too do this fast and fast.. Relevant Skills and Experience C++ software architecture c# Asp.Net

$25 USD in 1 day
(0 Reviews)
0.0