Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(C++ please help) 2. Create an OO C++ text-based simulation that plays baccarat between two players. In baccarat, there is a banker and there is

(C++ please help)

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

2. Create an OO C++ text-based simulation that plays baccarat between two players. In baccarat, there is a banker and there is a player. Two cards are dealt to the banker and two cards to the player. Both cards in each hand are added together, and the objective (player) is to draw a two or three-card hand that totals closer to 9 than the banker. In baccarat, the card values are as follows: 2-9 are worth face value 10, J, Q, K are worth 0 A is worth 1 The suits are the standard values. Players calculate their score by taking the sum of all cards modulo 10. In other words, after adding the value of the cards, the tens digit is ignored. So, for example, a hand consisting of 3 and 4 is worth 7 . A hand consisting of 7 and 8 is worth 5 (15 % 10). A hand consisting of 5 and 5 is worth 0 (10 % 10). The highest point total that can be achieved is 9, After the player and the banker are dealt two cards each, an additional card is drawn depending on the following conditions: If either the player's hand or the banker's hand totals 8 or 9, both automatically stand, and a winner is determined. If the player's hand totals 6 or 7, the player stands. If the player stands, the banker must draw a card if his/her hand totals 5 or less. If the player's hand is 5 or less, the player must draw another card. If the player draws a third card, then the banker must draw a third card if: . 2. Create an OO C++ text-based simulation that plays baccarat between two players. In baccarat, there is a banker and there is a player. Two cards are dealt to the banker and two cards to the player. Both cards in each hand are added together, and the objective (player) is to draw a two or three-card hand that totals closer to 9 than the banker. In baccarat, the card values are as follows: 2-9 are worth face value 10, J, Q, K are worth 0 A is worth 1 The suits are the standard values. Players calculate their score by taking the sum of all cards modulo 10. In other words, after adding the value of the cards, the tens digit is ignored. So, for example, a hand consisting of 3 and 4 is worth 7 . A hand consisting of 7 and 8 is worth 5 (15 % 10). A hand consisting of 5 and 5 is worth 0 (10 % 10). The highest point total that can be achieved is 9, After the player and the banker are dealt two cards each, an additional card is drawn depending on the following conditions: If either the player's hand or the banker's hand totals 8 or 9, both automatically stand, and a winner is determined. If the player's hand totals 6 or 7, the player stands. If the player stands, the banker must draw a card if his/her hand totals 5 or less. If the player's hand is 5 or less, the player must draw another card. If the player draws a third card, then the banker must draw a third card if

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_2

Step: 3

blur-text-image_3

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

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

The Market System as an Efficient Mechanism for Information

Answered: 1 week ago