Card poker game develop a simple poker game complete with

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

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: EM13347384

Questions Cloud

Structure and based analysis of proteinsproteins may be : structure and based analysis of proteinsproteins may be classified according to both structural and sequence
Write a computer program to prepare a linear support vector : write a computer program to prepare a linear support vector machine svm. your program could be able to incorporate and
The final project will be a cumulative project that will : the final project will be a cumulative project that will span the weeks of the course. each week you will complete a
1 nbspnbsp process solutions provides a computer-based : 1 nbspnbsp process solutions provides a computer-based document processing service. the accountant has produced the
Card poker game develop a simple poker game complete with : card poker game develop a simple poker game complete with basic ai using the object oriented programming principles
You are needed to identify risk management issue of crowd : you are needed to identify risk management issue of crowd management at music festivals and write an essay which
What do you mean by financial index and commodity : what do you mean by financial index and commodity index?method of index uses in calculation?weighted average method?how
Write project and progress reports a business leter and : write project and progress reports. a business leter and reasearch paper for 10 mhz digital frequency meter with
Case study equip hireequip hire is a commercial and : case study equip hireequip hire is a commercial and domestic equipment hire company with 11 branches across

Reviews

Write a Review

 

C/C++ Programming Questions & Answers

  Implement a semantic analysis

The program will implement Semantic Analysis. The assignment provides two options to define variable scope, either using the Global Option or the Local Option.

  C assignment of curl library

C Assignment Curl library must be used To be done on linux, it should be compiled using the following command: gcc -Wall -ansi -pedantic NameOfFile.c -lncurses Please make sure it is commented with clarification Variable names in camel case

  Stores a series of numbers in a binary tree.

Queue Converter, Write a program that stores a series of numbers in a binary tree. Then have the program insert the values into a queue in ascending order. Dequeue the values and display them on the screen to confirm that they were stored in the prop..

  A program computes and displays the number of centimeter

The Earth's ocean levels have risen an average of 1.8 millimeters per year over the past century. Write a program computes and displays the number of centimeters and number of inches the oceans rose during this time.

  Objectivein this assignment you read a list of employees

objectivein this assignment you read a list of employees from a csv file and convert them into corresponding objects.

  A constructor and a destructor

A constructor and a destructor, Insert a new element chosen by the user at the correct place in the list

  Implement a standard sorted linked list class

Write C++ Program:Implement a standard SORTED linked list class. Be sure to include constructor/copy constructor, destructor, and assignment operator overload.

  The method takes an array

The method takes an array of integers and returns true if there exists any item in the array that satisfies a specified condition. For instance, the following code fragment:

  Create if-then statement with single alternative decision

Create the If-Then statement (or a flowchart with a single alternative decision structure) which assigns 20 to  variable y and allots 40 to variable z if variable x is greater that 100.

  The two-dimensional array

1. Given the two-dimensional array declared by the following statement int myArray[4][3] = {{2,4,6},{1,8,10},{3,5,7},[9,11,13}}; what is the value of myArray[1][2]

  Write an entire c++ program that reads a positive integer

Write an entire C++ program that reads a positive integer entered by an interactive user and then prints out all the positive divisors of that integer in a column and in decreasing order.

  Create a 1-dimensional (1d) array

Write a program to create a 1-dimensional (1D) array that contains 15 characters and display to the screen a count of the occurrences of each of the vowels a, e, i, o, and u in the array.

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