Find Jobs
Hire Freelancers

C++ card game(repost)

$30-100 USD

Closed
Posted about 18 years ago

$30-100 USD

Paid on delivery
You are invited to design and implement a card game which simulates a simplified version of Bridge. In such a game, 52 standard cards are dealt randomly to four players (each receives 13 cards). Initially there is one player who is assigned as the banker (randomly generated by the system). At each round, each player releases one card. The player whose card has the highest value of the same suit as the banker’s suit (lead suit) wins the round (scores 1 point) and becomes the new banker in the next round. The game terminates after 13 rounds. Card values are ordered from 2-Ace: 2 is the smallest and Ace the largest. The player who receives the highest scores is the winner of the game. ## Deliverables 1.2 Tasks 1.2.1 Create a class called Card that represents a playing card. The class should include two private data items: value and suit. The member functions of the class should include, but not limited to, getValue(), setValue(int), getSuit(), setSuit(int) and displayCard() for accessing data members and display cards. Write a driver program to test the class. 1.2.2 Create a class called Player to simulate a dummy card player. The class should include at least two data items: playerName (string or char*) and holdingCards (array or vector of Card objects). The class should implement at least the following member functions: setPlayerName(string or char*), getPlayerName(), addCard(Card), release(Card&). The way of releasing cards can be simply removing a card from the top or bottom of holdingCards. Write a driver program to test the class. 1.2.3 Create a class called Game to simulate a card game. The class should be able to: · Store all players’ information (declare an array of four Player objects). · Store current score of each player. · Store current banker · Accept player names. · Randomly deal all 52 cards to four players (each holds 13 cards) at the beginning of each game. · Randomly assign a player as the banker at the beginning of each game. · Proceed with each round: collect players’ card, decide the winner and the next banker. · Display the score of each player at the end of each game. 1.2.4 (For Distinction or above only) Create a class called SmartPlayer which extends your Player class and implements smarter playing strategies try to win other players. A competition may organize with volunteering participants to test whose program is the smartest. 2.1 Documentation You are required to submit a report, which provides q a brief description of the problem and your solution q the pseudocode of your solution logic or UML description. q explanation of the major components of your program and functionality. q testing (very briefly no more than half page). q conclusion and references The report should not exceed 4 pages in A4 paper written in Microsoft Word. 3.2 Source code You are only allowed to use C++ to code your solution. ## Platform any that runs c++
Project ID: 3414603

About the project

19 proposals
Remote project
Active 18 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
19 freelancers are bidding on average $61 USD for this job
User Avatar
See private message.
$85 USD in 7 days
5.0 (37 reviews)
4.6
4.6
User Avatar
See private message.
$59.50 USD in 7 days
5.0 (45 reviews)
4.6
4.6
User Avatar
See private message.
$42.50 USD in 7 days
5.0 (58 reviews)
4.8
4.8
User Avatar
See private message.
$76.50 USD in 7 days
4.7 (29 reviews)
5.1
5.1
User Avatar
See private message.
$51 USD in 7 days
5.0 (41 reviews)
4.3
4.3
User Avatar
See private message.
$22.10 USD in 7 days
5.0 (41 reviews)
4.1
4.1
User Avatar
See private message.
$59.50 USD in 7 days
5.0 (26 reviews)
3.8
3.8
User Avatar
See private message.
$72.25 USD in 7 days
5.0 (15 reviews)
3.6
3.6
User Avatar
See private message.
$85 USD in 7 days
5.0 (9 reviews)
2.9
2.9
User Avatar
See private message.
$76.49 USD in 7 days
4.5 (6 reviews)
3.0
3.0
User Avatar
See private message.
$34 USD in 7 days
5.0 (1 review)
1.8
1.8
User Avatar
See private message.
$42.50 USD in 7 days
5.0 (1 review)
1.9
1.9
User Avatar
See private message.
$68 USD in 7 days
5.0 (4 reviews)
1.1
1.1
User Avatar
See private message.
$42.50 USD in 7 days
3.5 (3 reviews)
1.1
1.1
User Avatar
See private message.
$85 USD in 7 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$72.25 USD in 7 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$59.50 USD in 7 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$41.65 USD in 7 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$85 USD in 7 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of AUSTRALIA
Australia
0.5
1
Member since Oct 16, 2005

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.