Find Jobs
Hire Freelancers

C++ card game

$30-100 USD

Selesai
Dibuat sekitar 18 tahun yang lalu

$30-100 USD

Dibayar ketika dikirim
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++
ID Proyek: 3402009

Tentang proyek

15 proposal
Proyek remot
Aktif 18 tahun yang lalu

Ingin menghasilkan uang?

Keuntungan menawar di Freelancer

Tentukan anggaran dan garis waktu Anda
Dapatkan bayaran atas pekerjaan Anda
Uraikan proposal Anda
Gratis mendaftar dan menawar pekerjaan
Diberikan kepada:
Avatar Pengguna
See private message.
$24,99 USD dalam 7 hari
5,0 (41 ulasan)
4,1
4,1
15 freelancer menawar dengan rata-rata $56 USD untuk pekerjaan ini
Avatar Pengguna
See private message.
$85 USD dalam 7 hari
5,0 (122 ulasan)
5,6
5,6
Avatar Pengguna
See private message.
$59,50 USD dalam 7 hari
5,0 (45 ulasan)
4,6
4,6
Avatar Pengguna
See private message.
$51 USD dalam 7 hari
5,0 (41 ulasan)
4,3
4,3
Avatar Pengguna
See private message.
$85 USD dalam 7 hari
5,0 (15 ulasan)
3,6
3,6
Avatar Pengguna
See private message.
$85 USD dalam 7 hari
4,8 (11 ulasan)
3,4
3,4
Avatar Pengguna
See private message.
$76,50 USD dalam 7 hari
5,0 (19 ulasan)
3,2
3,2
Avatar Pengguna
See private message.
$15,30 USD dalam 7 hari
5,0 (6 ulasan)
2,8
2,8
Avatar Pengguna
See private message.
$85 USD dalam 7 hari
5,0 (6 ulasan)
2,7
2,7
Avatar Pengguna
See private message.
$51 USD dalam 7 hari
4,8 (4 ulasan)
1,7
1,7
Avatar Pengguna
See private message.
$55,25 USD dalam 7 hari
5,0 (2 ulasan)
1,5
1,5
Avatar Pengguna
See private message.
$17 USD dalam 7 hari
5,0 (4 ulasan)
1,1
1,1
Avatar Pengguna
See private message.
$42,50 USD dalam 7 hari
5,0 (2 ulasan)
0,5
0,5
Avatar Pengguna
See private message.
$59,50 USD dalam 7 hari
0,0 (1 ulasan)
0,0
0,0
Avatar Pengguna
See private message.
$46,75 USD dalam 7 hari
0,0 (0 ulasan)
0,0
0,0

Tentang klien

Bendera AUSTRALIA
Australia
0,5
1
Anggota sejak Okt 16, 2005

Verifikasi Klien

Terima kasih! Kami telah mengirim Anda email untuk mengklaim kredit gratis Anda.
Anda sesuatu yang salah saat mengirimkan Anda email. Silakan coba lagi.
Pengguna Terdaftar Total Pekerjaan Terpasang
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuat pratinjau
Izin diberikan untuk Geolokasi.
Sesi login Anda telah kedaluwarsa dan Anda sudah keluar. Silakan login kembali.