Question: Description of Problem: Write a simple menu-driven game program by using C++ programming language. In the main-menu screen, players can choose the various options of

Description of Problem:

Write a simple menu-driven game program by using C++ programming language. In the main-menu screen, players can choose the various options of this game, such as:

  1. Help
  2. Specify your betting position for the Three cards
  3. Start shuffling the Three cards
  4. Check Players Performance (Financial status and number of win/lose)

  1. Quit this Program

When option 3 (Start shuffling) is chosen, the game will immediately show whether the player wins or loses for this game. The win-counter and lose-counter will also be updated and displayed.

Assuming that there are three cards in this game.

Possible betting positions are:

  • position1 .. from 1 to 10
  • position2 .. from 11 to 20

position2 .. from 21 to 30

  • The player can place his/her bet on any one of these three positions. If the result of the three cards matches his/her bet position, then the player wins; otherwise, the player loses.
  • A player can check his/her financial status and winning/losing status by simply choosing the Check Players Performance option from the main-menu.

Rules for this game:

  • Permissible bets are: position1, position2, and position3.
    • Position1: sum of the three cards must be from 1 to 10.
    • Position2: sum of the three cards must be from 11 to 20.
    • Position3: sum of the three cards must be from 21 to 30.
  • Whenever the player chooses the Start shuffling option, each of the three cards would be randomly assigned an integer number.
    • Possible numbers appeared on each card are: 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!