Question
You are to write a program to play the game Wheel of Fortune. If you are not familiar with the game, please watch this YouTube
You are to write a program to play the game “Wheel of Fortune”. If you are not familiar with the game, please watch this YouTube video: https://www.youtube.com/watch?v=OeX1rJ9Abr0. The game you are to get your program to play is contained in the time segment starting from 3 minutes 16 seconds into the video up till 5 minutes. Basically, it contains a puzzle which is a phrase containing a number of words, which are made up of letters. At the start, all the letters are set to blank. The players are to fill in the blanks by guessing one letter at a time, until a player could complete the phrase correctly. Before guessing, a player needs to spin a wheel, shown in the figure below.
The wheel is divided into 24 sectors. Each sector contains either 1. a number, or
2. the word “Bankrupt”, or
3. the phrase “Lose a turn” or
4. the phrase “Free play”.
Rules and Actions of the Game
A player spins the wheel which will stop at a sector. Here are the rules and actions upon a spin:
1. If the spin stops at a number, the player is to either call out a consonant or buy a vowel at $250,within ten seconds.
a.If the player calls out a consonant,
i.If the consonant exists in the phrase, the player is awarded the dollar value of thenumber multiplied by the number of occurrences of the consonant in the phrase, and the consonant is filled into the phrase. The player is then allowed one of three actions:
a. Spinthewheelagain,whichmeanswereturntoStep1.
b. Buy a vowel by calling out the vowel desired. One of three things can happen:
i.Each vowel costs $250 and is to be deducted from the player’s total so far. If the player’s total is below $250, the player cannot buy and therefore must spin again.
ii.The vowel exists, and is filled into the appropriate blank(s) in the puzzle. $250 is deducted from the player’s total regardless of the number of occurrences of the vowel. The player then can buy another vowel (return to Step 1.a.i.b) or spin the wheel again (return to Step 1).
iii.The vowel doesn’t exist or has already appeared. The player loses the turn. $250 is deducted.
c. Solvethepuzzle.
ii.If the letter does not exist, the player loses the turn.
If the player buys a vowel, then the play moves to 1.a.i.b above.
b.
2.If the spin stops at “Bankrupt”, the player loses all the money won so far and loses the turn.
3.If the spin stops on “Lose a turn”, the player loses the turn but keeps the money won so far.
4.If the spin lands on “Free play”, the player is to call out a letter, either consonant or vowel.
1.If the letter exists, it is filled into the phrase. No money is added. Then the player returns tospinning the wheel, buying a vowel or solving the puzzle.
2.If the letter doesn’t exist, the player proceeds to spinning the wheel, buying a vowel orsolving the puzzle without losing a turn.
5.Upon successfully filling in a letter, the player is offered one chance only to complete the phrasewithin 10 seconds.
1.If this is successful, the player keeps the money earned so far, and the game ends. All theother players get nothing.
2.If this is not successful, then the player loses the turn.
6. Once the current player loses the turn, the next player spins the wheel, and we return to Step 1 for this new player.
A flow chart of the game is given at the end of this handout.
Step by Step Solution
3.32 Rating (152 Votes )
There are 3 Steps involved in it
Step: 1
The wheel is divided into 24 sectors Each sector contains either 1 a number or 2 the word Bankrupt or 3 the phrase Lose a turn or 4 the phrase Free play Rules and Actions of the Game A player spins th...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started