CSCI 261 - Programming Concepts (C++)Spring 2017 - Assignment 05 - Wheel of Fortune!Quick Links: Blackboard | Canvas | CS @ Mines | Cloud9 | Piazza | zyBooks |
|||||||||
| Home | Contact | Syllabus | Assignments | Schedule | Resources | | |||||||||
This assignment is due
by Tuesday, February 14, 2017 11:59pm.
This assignment exercises your ability
to use conditionals, loops, and arrays together.
Instructions
Your goal for this assignment is to create a playable Wheel of Fortune
(Hangman) game. You will need to create a secret word for the user to
try and guess one letter at a time.
First you need to ask the
user to enter a letter. Then you'll check if that letter exists in your
secret word. If it does exist, then you should tell the user and
display the puzzle with the letter revealed. If the letter does not
exist, then inform user the letter is not found. You will repeat this
process until all the correct letters have been guessed or the user has
entered 7 wrong letters.
Hopefully it is readily clear that you
will need to use a loop to keep prompting the user to enter a letter.
You will also need to use conditionals to check if the letter exists.
You will need to use an array to store the secret letter (since a word
is just a collection of letters). We'll also need arrays to keep track
of the previously guessed letters (we don't want the player to guess
wrong a second time) and the solved letters.
An example of a winning game:
Wheel! Of!! Fortune!!!
Take a guess: _ _ _ _ _ _ _ _ _ _ _ Your guess: a There's an A! Take a guess: _ _ _ _ _ A _ _ _ _ _ Your guess: c Sorry, no C's. You have 6 wrong guesses remaining. Take a guess: _ _ _ _ _ A _ _ _ _ _ Your guess: a You already guessed A. ... Take a guess: P R O _ R A M M I N _ Your guess: g CONGRATS! You solved the puzzle: P R O G R A M M I N G
An example of a losing game:
Wheel! Of!! Fortune!!!
Take a guess: _ _ _ _ _ _ _ _ _ _ _ Your guess: a There's an A! Take a guess: _ _ _ _ _ A _ _ _ _ _ Your guess: c Sorry, no C's. You have 6 wrong guesses remaining. Take a guess: _ _ _ _ _ A _ _ _ _ _ Your guess: q Sorry, no Q's. You have 5 wrong guesses remaining. ... Take a guess: _ _ _ _ _ A _ _ _ _ _ Your guess: w Sorry, no W's. You have 1 wrong guess remaining. Take a guess: _ _ _ _ _ A _ _ _ _ _ Your guess: X Sorry, no X's. You lose. Try again! Hints
Functional Requirements
Grading Rubric
Your submission will be graded according to the following rubric.
Submission
Always, always, ALWAYS update the
header comments at the top of your main.cpp file. And if you ever get
stuck, remember that there is LOTS of help
available.
In summary, for homework due on
Tuesday, February 14 follow these specific steps:
This assignment is due
by Tuesday, February 14, 2017 11:59pm.
| |||||||||
Last Updated: 01/01/70 00:00
|