Top Down Design: Simplified Wheel of Fortune Solitaire
Wheel of Fortune is an American game show where contestants compete to guess a mystery phrase and win cash.
We will design a solution to a simplified single-player version of Wheel of Fortune. The goal of our game is to solve the puzzle and win as many points as possible.
At the beginning of the game:
-
The player starts with 0 points and 5 tokens.
-
A phrase and a category are shown to the player with all letters hidden. Players can see spaces and punctuation.
The player’s turn
Each turn, the player can choose one of the following options:
-
Spin the wheel
-
Guess the puzzle
-
Quit
Spin the Wheel
If the player chooses to spin the wheel, the outcome of the spin can either be a positive point value or zero.
-
If the outcome is zero, the player loses all of the points they’ve accumulated so far and they lose one of their remaining tokens.
-
If the outcome is positive, the user can guess a letter in the puzzle.
-
If the letter is not in the puzzle, they lose one of their remaining tokens.
-
If the letter is in the puzzle they win a number of points equal to the spin value times the frequency of that letter in the puzzle.
-
Guess the puzzle
If the player chooses to guess the puzzle, the player will be prompted to provide a solution.
-
If the guess is correct, the player wins the game.
-
Otherwise, they lose one of their remaining tokens.
Quit
If the player chooses to Quit, the program will display the answer to the puzzle and the player earns no points.
End of the game
At the end of the game, the player earns points equal to the points accumulated during the game times the number of tokens they have remaining.
Sample games
You can see sample games here. Your program doesn’t need to have the exact same output. The sample is provided to give you a sense of how the game works.