Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++, USING Qt creator. Video Poker Simulation Acme Software, Inc, has been contracted to write a Video Poker Simulation game in basic C++ that follows

C++, USING Qt creator.

Video Poker Simulation

Acme Software, Inc, has been contracted to write a Video Poker Simulation game in basic C++ that follows the following rules:

Basic Setting:

The player places an initial bet between one (1) and fifty (50) coins, where each coin is worth $1.00. The player is then dealt five (5) cards and allowed to choose which cards, if any, they wish to keep. The cards that they do not wish to keep are discarded, and replacement cards are dealt so that they again have a total of five (5) cards. The computer then determines what amount they have won, if any.

Card Ranks and Suits:

Cards are ranked, from highest to lowest:

Ace

King

Queen

Jack

Ten

Nine

Eight

Seven

Six

Five

Four

Three

Two

Ace

(Ace can count as either low or high. See "Royal Flush"'s scoring, below.)

The card suits are: Hearts, Clubs, Diamonds, and Spades

Hand Ranks:

When you are dealt replacement cards for your discards, your new hand is evaluated. Based on what kind of hand you're holding, you'll receive a certain number of coins.

Hands are listed below, from best (highest scoring), to worst (no score):

Royal Flush - 400 coins

A straight flush, with the Ace high.

In other words, a Ten, Jack, Queen, King and Ace, all of the same suit.

Straight Flush - 50 coins

A straight flush.

In other words, all five cards are consecutive and are the same suit.

For example: Three of Clubs, Four of Clubs, Five of Clubs, Six of Clubs and Seven of Clubs.

Four of a Kind - 25 coins

Four cards of the same value. (Obviously, each of different suits.)

Full House - 8 coins

A three of a kind and a pair at the same time.

Flush - 5 points

All cards in your hand are the same suit.

Straight - 4 coins

All five cards are consecutive.

For example: Three of Clubs, Four of Spades, Five of Clubs, Six of Diamonds, and Seven of Hearts.

Three of a Kind - 3 coins

Three cards of the same value.

Two Pair - 2 coins

Two pairs of cards.

In other words, two cards in your hand are the same value, and two other cards in your hand are also the same value.

Pair - 1 coins

Two cards in your hand are the same value. In this version, they must be Jacks or better!

None of the Above - 0 coins

Each turn "costs" at least one coin to play, so if you get a pair, no additional coins are actually added to your total score. If you don't get anything, you actually lose the number of coins that you bet! If you bet more than one coin, then the returns above are multiplied by the number of coins entered to give the actual yield. This is just how handheld and Vegas video poker games actually work!

Project Requirements:

Your project must meet the following specifications:

Text-based display of what is in the players hand.

Read all cards to be discarded at once

Ask the user their name when starting. All players have a file of their name with their former scores. Files are named .game. The file contains the state of a previous game so that a player can resume a game at any point. If the file does not exist, that means you have a new player, and you must welcome them to your casino. If the file exists, you must welcome them back and restore their "bank" with the value stored in the file. Thus, your program must read and write to a file as well as verify that a file exists.

Provided adequate help for the player on how to play the game.

Score all hands correctly.

Know the players name and be friendly

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

More Books

Students also viewed these Databases questions