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:
- Help
- Specify your betting position for the Three cards
- Start shuffling the Three cards
- Check Players Performance (Financial status and number of win/lose)
- 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
Get step-by-step solutions from verified subject matter experts
