Hangman
From WLCS
Objective(s)
- You will design and implement a program that plays Hangman
- You will use and manipulate strings
- You will use and manipulate lists
- You will use file input
- You will use functions
- You will use loops
Directions
Planning & Design:
- Review the rules of Hangman
- Open a Google Doc and name it Hangman Design
- Put your name at the top
- Add sub-headings for the following: Variables & Types, Requirements, Design
- Under the Variables & Types section, list all the variables that you expect to use and their types (be sure to identify any lists)
- Under the Requirements section, list all the rules and requirements for the Hangman game
- These should be the big picture requirements of how the game works
- Under the Design section, write the step-by-step English instructions/pseudocode of your Hangman game
- This should be the plain language, specific step-by-step instructions of the program (different from rules)
- You should detail and describe any input or output
- Be sure to detail what exactly happens in each step (e.g. check each letter of the secret word to see if it matches the guessed letter...)
- You should include every step from the very beginning when the game starts up until when the game ends
- Submit the Hangman Design via Google Classroom
Requirements (at a minimum):
- The secret word should be picked randomly from a text file of random words (you create the text file)
- Player should be allowed to guess a letter
- Player is only allowed 7 incorrect guesses (display number of incorrect guesses left every turn)
- Correct letters are revealed in the secret word
- Incorrect letters are added to an incorrect list
- Game over when all letters are revealed correctly or when the player is out of guesses
Advanced Requirements:
- Your game is idiot-proof (i.e. player cannot input invalid keys, numbers, or words unless the word is the solution)
- Your game can handle multiple words (i.e. hyphens and spaces are shown automatically)
- Your game handles upper and lower case letters the same (i.e. guessing 'a' or 'A' reveals all the upper and lower As)
- Print out a fake graphical hangman in the console (Example)