Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use qt creator for c++, and attach a screenshot of the run result with the code. Thank you! ** For each question, write pseudocode

Please use qt creator for c++, and attach a screenshot of the run result with the code. Thank you!

** For each question, write pseudocode definition and apply top-down/bottom-up design principle before going for implementation.

** Please provide sufficient test cases for each question

Problem Description:

0. You will only need to develop the game to support new hand, hit me, stand and hint functionality. Each functionality demonstrated in the subsequent steps.

1. You will need to develop a console menu to allow user to choose on the following:

***********************************

1) New Hand

2) Hit Me

3) Stand

4) Hint

5) Exit

***********************************

Your Choice? >

2. Upon user enter "1", you will begin a new game by seeding dealer cards and player cards; the example shown below:

Dealer picked the 2 of Diamonds

You picked the 8 of Diamonds

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Dealer Value: 2

Player Value: 8

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

***********************************

1) New Hand

2) Hit Me

3) Stand

4) Hint

5) Exit

***********************************

Your Choice? >

3. Based on Dealer face value and the player card value known to the player only, player will need to make the choice of hit me or stand depend on the player's strategy. Let's choose "2" hit me in the console menu to continue the game. the example shown below:

You picked the 10 of Diamonds

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Dealer Value: 2

Player Value: 18

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

***********************************

1) New Hand

2) Hit Me

3) Stand

4) Hint

5) Exit

***********************************

Your Choice? >

4. Based on the Dealer face value and the player card value known to the player only, player need to make another choice on hit me or stand; please note that #3 step could be repeating many times until player card value is over 21. Let choose "3" stand in the console menu to continue the game, the example shown below:

Dealer picked the 4 of Clubs

Dealer picked the 10 of Diamonds

Dealer picked the 9 of Diamonds

House busts! You win!

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Dealer Value: 25

Player Value: 18

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

5. Once Player stands, the dealer will pick the car until dealer card value reaches 17 or larger. In some cases, dealer will have card value over 21 which considered busted. That is the case demonstrated above.

6. There is a general guideline for player should use hit me or stand depend on the current player card value and dealer face value. You should implement 4 for Hint to print out the hint table and give suggestion based on dealer face card and player card value. Suggest H for the D and h for the H in the chart below. [Please note, you should load the hint table from the file and store in memory]

^^^^^^^^^^^^Dealer Card^^^^^^^^^^^^

Player 2 3 4 5 6 7 8 9 10 A

5-7: H H H H H H H H H H

8: H H H D D H H H H H

9: D D D D D H H H H H

10: D D D D D D D D H H

11: D D D D D D D D D D

12: H H S S S H H H H H

13: S S S S S H H H H H

14: S S S S S H H H H H

15: S S S S S H H H H H

16: S S S S S H H H h h

17: S S S S S S S S S S

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Suggestion: [2 or 3]

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

7. Additional validation on the console menu should prevent player choose new hand without finishing previous player session.

8. Of course, you can always add your own idea into this lab.

Note: For the complete rule of blackjack referenced in this homework, go to, http://wizardofodds.com/games/blackjack/ (Links to an external site.)Links to an external site.

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

Relational Database Technology

Authors: Suad Alagic

1st Edition

354096276X, 978-3540962762

More Books

Students also viewed these Databases questions

Question

Describe business models and discuss their importance.

Answered: 1 week ago