Develop a simple poker game complete with basic ai

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

Assignment: Simple 5-Card Poker Game

In this assignment, you will develop a simple poker game, complete with basic AI, using the object oriented programming principles discussed in class.

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

12. Indicate the winner on the screen.

Attachment:- Card Poker Game.rar

Reference no: EM131225507

Questions Cloud

How technology affects social skill development : How Technology affects Social Skill Development? Some people feel that technology has made our world smaller and more social with the ability to communicate 24/7 via email, use social networking, and text, IM.
What is its return on stockholders equity : What is its return on stockholders' equity? (Do not round intermediate calculations. Input your answer as a percent rounded to 2 decimal places.)
Prepare a journal entry for each transaction : Discuss the right of shareholders of capital stock for company A that they are entitled to. Company A is formed as a corporation and therefore, its shareholders have limited liability. Limited liabilitymeans that stockholders can only lose the amo..
Conduct complied with or violated the standard : Evaluate Sokol's conduct and determine which, if any, of the CFA Institute Standards of Professional Conduct are applicable. For each applicable Standard, determine whether conduct complied with or violated the Standard. What should Mikkel Orut do..
Develop a simple poker game complete with basic ai : In this assignment, you will develop a simple poker game, complete with basic AI, using the object oriented programming principles discussed in class.
Would you invest in government issued t-bills : Would you invest in government issued T-bills? Why or why not? Are there specific munis you would or would not invest in? What factors affect your choices? Discuss in detail. What is the current status of government securities? Evaluate and explain.
What is nan basis in her newco corporation stock : Nan receives Newco Corporation stock worth $70, and Newco Corporation assumes a $130 incurred liability of N with no improper tax motive on the part of Newco Corporation or Nan. What is Nan's basis in her Newco Corporation stock?
Differences between a corporation and a partnership : Q1. What are the main differences between a corporation and a partnership? Q2. Use your own words, please briefly explain why financial sectors are important.
Domestic and international financial marketplace : Topic include financial markets, types of financial intermediaries, the form and methods of stock market operation, the stock market, multinational corporation, foreign exchange rate quotations, trading in foreign exchange, forward and future cont..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a function name is prime

Write a function name is Prime, which takes an integer as an argument and returns true if the argument is a prime number, or false otherwise. Demonstrate the function in a complete program.

  Derive class weekday from class datetime

We can retrieve any one of the date-time structure member using strftime - Derive class WeekDay from class DateTime such that WeekDay::display() will display local date time using values from the parameters and the corresponding weekday.

  Compound and nested if statements

Compound and Nested If Statements- Suggest one (1) example of a problematic programming situation or scenario that the use or implementation of a compound if statement could resolve. Justify your response

  Write c++ programs

Write a C++ program to accept distance in kilometers, coverts it to meters and then displays the result. Write a C++ program to find area and circumference of a circle.

  The definition for a printallplayers() function

Add the Prototype, a call and the definition for a printAllPlayers() function that prints to STDOUT (using cout) each players name and all of their at-bat stats. Only print out the values of the stats array up to timesAtBat.

  A list of toppings should be shown on the screen as a menu

Write a menu-driven C++ program that allows a user to select from the following items: Pizza, Cheeseburger, and Hot Dog. Pizza should be represented by the integer value 1. Cheeseburger should be represented by the integer value 2.

  Testing a program based on varying

Testing a program based on varying input values without knowing what the code looks like is called _____.With _____ testing, you make sure that every instruction in the code is executed at least once.

  Least number of comparisons needed

What is the least number of comparisons needed to sort an array of 6 numbers, in the worst case, using any sorting algorithm that sorts with binary comparisons? Explain

  What the final value of the variable sum e was

Write a program that asks the user to enter an integer dollar amount between 1 and 5,000. Your program should display the corresponding class description using the following table. Write the program so that it executes until the user inputs some v..

  The function should return a value

The function should return a value of 1 when it is given a valid score to process and 0 when the received value is out side of the 0-10 range. In this case it should print a waring message on the screen

  What are the values of sum1 and sum2

If the operands in the expressions are evaluated right to left?

  Implement the bounded stack with a concrete class

Using Eclipse, implement the bounded stack with a concrete class names

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