Develop a simple poker game

Assignment Help C/C++ Programming
Reference no: EM131315

Card Poker Game

Develop a simple poker game, complete with basic AI, using the object oriented programming principles discussed in class.

UML Class Diagram

Your assignment must contain and use the following classes:

Card and Deck Classes

The Card and Deck classes are direct carryovers from Lab #2. For more information about these classes, see the Lab #2 document on the course website.

Hand Class

You will need two instances of the Hand Class in your game: one for the player, and one for the computer. Each Hand will contain the respective player's current hand of cards. The hand class must have several helper methods that can be used to determine the strength of the hand. If you are unfamiliar with poker hands, Wikipedia has a related article that may be of interest.

PokerGame

Like the BlackJack class in Lab #2, the PokerGame class will be used to encapsulate all of the logic associated with playing the game of poker. The play method's operation will be discussed in the next section.

Flow of Play

Your poker game's play() method should operate as follows:

1. Deal the player five cards and display the results on the screen

2. Ask the player which cards he or she would like to exchange

3. Remove the desired cards from the player's hand

4. Deal the player N new cards (N = exchange amount)

5. Display the new hand on the screen

6. Deal the computer five cards and display the results on the screen

7. The computer determines how many cards to exchange based on the following logic:

a. zero cards if the computer has a four of a kind, full house, straight, or flush

b. one card if the computer has two pair

c. two cards if the computer has three of a kind

d. three cards if the computer has a pair

e. five cards if the computer has none of the above

8. Remove the appropriate number of cards in the computer's hand

9. Deal the computer the appropriate number of replacement cards

10. Display the new hand on the screen

11. Determine the winner of the game based on the following rankings:

a. Four of a kind

b. Full house

c. Flush

d. Straight

e. Three of a kind

f. Two Pair

g. Pair

h. High Card (ordered by Spade, Heart, Diamond, with Club being the lowest)

12. Indicate the winner on the screen

Reference no: EM131315

Questions Cloud

Structure and based analysis of proteins : Structure and based analysis of proteins
Linear support vector machine svm : Write a computer program to prepare a Linear Support Vector Machine SVM.
Find sources of revenue tenet healthcare : Tenet Healthcare and HCA Holdings Inc. are major competitors in the healthcare industry.
Computer-based document processing service : Process Solutions provides a computer-based document processing service
Develop a simple poker game : Develop a simple poker game
Identify risk management issue of crowd management : Identify risk management issue of Crowd Management
Financial index and commodity index : What do you mean by Financial index and commodity index?
Write project and progress reports : Write Project and progress reports
Developing business information system solutions : Equip Hire recorded turnover of just over $18 million for the financial year ended 2012. About eight years ago the company invested in a sales and hire system

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Design a nested program

How many levels of nesting are there in this design?

  Uml diagram of all the classes

Speaking of converting into the correct object-type, the goal of the factory is to abstract away object creation.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Show the deatils of an emplyoee - c programming

Show the deatils of an emplyoee in a neat format.

  Calculate the trajectory of a soccer ball

Write a program to calculate the trajectory (flight path) of a soccer ball

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Calculation of mortgage interest rates

Instruction of pointers and the calculation of mortgage interest rates.

  Write a program to read a data file and extract parameters

Write a C/C++ program to read a data file and extract parameters. The program must obtain the filename via a command-line argument.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Model-view-controller

Explain Model-View-Controller paradigm

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd