Find Jobs
Hire Freelancers

c++ card game homework

$10-30 USD

Completed
Posted over 8 years ago

$10-30 USD

Paid on delivery
using eclipse and mingw Contract Bridge is a card game where players must bid how many tricks they will win at the start of the play. To do this, players evaluate their hands and assign a “point value” to the hand. For this assignment you will read in a representation of a bridge hand, evaluate the point value, and print out how many points are in the hand. A bridge hand is made up of 13 cards. Each card has a face value, represented as one of the character sequences A,2,3,4,5,6,7,8,9,10,J,Q,K; and a suit, represented by one of the characters C D H S. So, for example, the nine of clubs is represented as 9C. The input to the program will be strings representing cards. Each card is a face value separated from the other by a comma, spaces or newlines. When the input contains a single line containing nothing but a dot character, this indicates that the input of this hand is complete. Once you read a hand in, you must apply the following rules to calculate the point value for the hand:  Each Ace (A) is worth 4 points  Each King (K) is worth 3 points  Each Queen (Q) is worth 2 points  Each Jack (J) is worth 1 point  If the hand contains no aces, subtract 1 point  If the hand contains four aces, add 1 point  If the hand contains only one king, queen or jack, subtract 1 point  For each suit with more than 4 cards in it, add 1 point for each card past 4 cards  For each suit with zero cards in it, add 3 points  For each suit with one card in it, add 2 points  For each suit with two cards in it, add 1 point When you calculate the resulting points, you should print out, on a line by itself: HAND x TOTAL POINTS y Where x is an integer indicating the hand that was read in (the first hand is 1, the second is 2, etc.), and y is the points that you calculated for the hand. Your program will read the standard input for a hand. When the input of the hand is complete, your program should validate that the hand is correct, calculate the points, print the result, and read the standard input for the next hand. A hand is correct if and only if it has 13 correctly formatted unique cards in it. If any of the cards is incorrectly formatted, the program should print BAD FORMAT. If the count of cards is wrong, the program should print WRONG NUMBER OF CARDS. If there are duplicate cards in the hand, the program should print DUPLICATE CARDS. In these error cases, the program should continue reading the standard input for the next hand after it prints the error message. Your program should terminate on end-of-file.
Project ID: 9610602

About the project

7 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hello. It is easy assignment and it can be completed in few hours of pure working time .................
$16 USD in 1 day
4.9 (1042 reviews)
7.3
7.3
7 freelancers are bidding on average $39 USD for this job
User Avatar
I can solve your problem within 1 day. Quickly and well. I have a lot of experience with C++ and algorithms. I have recently graduated from the second-best IT university in Europe (University of Warsaw).
$30 USD in 1 day
5.0 (8 reviews)
3.1
3.1
User Avatar
Hello, client i have rich experience in C/C++/C# programming. I have rich knowledge about algorithm and data structure. Thanks Best regards
$54 USD in 1 day
4.8 (1 review)
3.4
3.4
User Avatar
Hello. How are u. I saw your description I have done several project like this. I'm an expert in Data Structures and Algorithms. And I know Java ,C/C++, C# and Python well. I'm interested this Project. I want to discuss with you about this project. If it's possible,please contact me and explain more detail. I wait your good reply. Bye.
$100 USD in 2 days
5.0 (6 reviews)
2.0
2.0
User Avatar
I have 2 years experience in c++ programming and I will get the task done in time with a well commented code
$25 USD in 3 days
5.0 (1 review)
1.0
1.0
User Avatar
Hi i can help u with this ................................................................ ........................... .......
$40 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi, my name is Cesar. I am a Systems Engineer with 7 years of experience on C/C++ programming and other OOP languages. Also, I have strong skills in ADT programming as you need. I think that i will finish your project in 1 day. A previous experience was the Balote game that i programmed in C++ language. My work includes: + ADT classes - Constructors/Destructors/Getters and Setters functions + Full Commented Code - Class documentation - Block documentation - function documentation +Game logic - Implement the game logic and a main function to test it. +User Interface - AN intuitive console interface will provided. + Teach you all Project features and help to run the program (if needed) Thanks for read my bid, i hope to work for you. If you need some Class Example to see my work do not hesitate to ask for. Regards !
$20 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi, You should learn to do tour home work(word of advice) I'm working as a software engineer so this work will be easy for me to do you can trust me Thank you
$25 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Newark, United States
5.0
1
Payment method verified
Member since Feb 10, 2016

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.