Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You will implement the program for playing a modified Wheel of Fortune. The game

ID: 3668155 • Letter: Y

Question

You will implement the program for playing a modified Wheel of Fortune. The game must allow a user to enter the number of rounds to play and a new secret message (possibly containing blanks) with each round, and print the number of dashes/slots for the message (spaces do not get dashes, just the space).

The game can play with 1-3 players, and it continues a round, until someone solves the puzzle correctly. A new puzzle is given with each round. In this Wheel of Fortune, you won’t win as much or any prizes, but you might go bankrupt or lose a turn!!! Your random numbers are only from 0-21, with 0 being bankrupt, 1-20 being the dollar amount earned per letter found in the puzzle, and 21 is lose a turn.

The game begins by asking the first player if he/she wants to spin the wheel, buy a vowel, or solve the puzzle. On a player’s first turn, it might not make sense to choose anything other than spinning the wheel, but a player is given these three choices at all times during their turn, until they guess an incorrect non-vowel letter, incorrectly solve the puzzle, or spin a 0 or 21.

If the player chooses to spin and the spin is >0 and <21, then the player is asked to guess a nonvowel letter. If the non-vowel letter was not found in the puzzle, then the player loses their turn to the next player. If the non-vowel letter is found in the puzzle, then the player wins the number of letters found * the dollar amount spun.

If a player spins a 0, then the player’s earnings go to a zero in that round, and the next player gets the three choices to spin the wheel, solve the puzzle, or buy a vowel. If a player spins a 21, then the player’s keeps the round earnings, but the next player gets the three choices to spin the wheel, solve the puzzle, or buy a vowel.

If a player chooses to solve the puzzle and does so correctly, then the player gets to keep all the money earned in that round, while all other players lose their money in that round. If a player chooses to solve the puzzle and does so incorrectly, then the turn goes to the next player.

A player can only buy a vowel when his/her earnings are >= $10, which is the one-time amount paid for each vowel guess, regardless of whether the vowel is found.

The player who has the most money after N rounds is the winner!

A few rule specifics:

·You have a total round earnings and a total game earnings.

·You always gets a choice of spinning the wheel, solving the puzzle, or buying a vowel during your turn.

·You lose your turn by incorrectly guessing a non-vowel letter on a spin, spinning a 0 or 21, or incorrectly solving the puzzle.

·If you spin > 0 or <21, then you get the number spun * the number of non-vowel letters found added to your round total.

·If you spin a 0, then you go bankrupt in the round (lose your round total), and it ends your turn.

·If you spin a 21, then you keep your round total, but it ends your turn.

·You can buy a vowel for $10, and you only pay the $10 vowel purchase once on a guess, independent of how many are found.

·If you solve the puzzle correctly, then you keep the money earned for that round and add it to your total game earnings.

·You win the game by having the most game earnings, not round earnings!!!

Your program must print out 1) the number spun on the wheel,2) the number of letters found for a guess, 3) the total round earnings, 4) the message with the correctly guessed slots and blank slots, 5) if the user guesses the message, then a winner message and the total game earnings for all players, and 6) after all rounds are played, a message with the winning player.

Program Requirements:

·Only use C++ strings, no need for an array! Hint: use two strings!

·Your program must ignore cases in the message.

·Each function, including main, may not have more than 15 lines of code (this doesn’t include comments and blank spaces!).

·You are not allowed to use global variables.

Read the C++ string documentation to help with this assignment:

http://www.cplusplus.com/reference/string/string/?kw=string

**You can decide how many incorrect guesses a user gets before they lose. In addition, you can use the system (“clear”); command from the to clear the screen, after the user enters their message. Yes they can scroll above to see the message, but we aren’t cheaters!!!

Example Run:

Enter a message: National Park Service

How many players do you have? 2

How many rounds for winning? 1

The message is _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Player 1:

Do you want to spin (1), solve the puzzle (2), or buy a vowel (3): 1

Your wheel landed on 20

Guess a letter: n

2 found. Total: $40

The message is N _ _ _ _ n _ _ _ _ _ _ _ _ _ _ _ _ _

Do you want to spin (1), solve the puzzle (2), or buy a vowel (3): 1

Your wheel landed on 10

Guess a letter: l

1 found. Total: $50

The message is N _ _ _ _ n _ l _ _ _ _ _ _ _ _ _ _ _

Do you want to spin (1), solve the puzzle (2), or buy a vowel (3): 3

Guess a vowel: a

3 found. Total: $40

The message is N a _ _ _ n a l _ a _ _ _ _ _ _ _ _ _

Do you want to spin (1), solve the puzzle (2), or buy a vowel (3): 1

Your wheel landed on 0

Total: $0

The message is N a _ _ _ n a l _ a _ _ _ _ _ _ _ _ _

Player 2:

Do you want to spin (1), solve the puzzle (2), or buy a vowel (3): 1

Your wheel landed on 5

Guess a letter: r

2 found. Total: $10

The message is N a _ _ _ n a l _ a r _ _ _ r _ _ _ _

Do you want to spin (1), solve the puzzle (2), or buy a vowel (3): 1

Your wheel landed on 10

Guess a letter: t

1 found. Total: $20

The message is N a t _ _ n a l _ a r _ _ _ r _ _ _ _

Do you want to spin (1), solve the puzzle (2), or buy a vowel (3): 2

Guess message: National Park Service

You are correct! Player 2 wins round 1.

Player 1 total: $0

Player 2 total: $20

Player 2 wins game!

Explanation / Answer

Hi Below i have written the sample code for Wheel of Fortune, Please refer to it.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote