For this assignment, you will be creating a text-based game: Hangman. The general rules of this game can be found on the Wikipedia page. Instead of being a two human player game, the AI will choose a random word from wordBank.txt, which contains 4000+ common words. The human player will only be allowed to guess a letter from the alphabet (26 letters, case-insensitive) and to have eight incorrect guesses before he/she loses.
It will be up to you to design the user interface, but it needs to be intuitive similar to the example. While it is not imperative to draw the stick figure, the program needs to indicate how many guesses the user has left.
Evaluation: 20 marks
- Functionality: 10 marks
- Choose a random word on the list.
- Display the blanks and number of remaining guesses.
- Ask the user to enter a valid character (A-Z only).
- If character is invalid or already chosen, do nothing.
- If correct, display character.
- If all the characters displayed, player wins.
- If incorrect, reduce number of remaining guesses.
- If no more remaining guesses, player loses.
- If game is over, ask user if they want to quit or play again.
- Repeat step 3 to 9.
- User Interface: 4 marks
- 4 = Fully Meeting Expectations
- 3 = Mostly Meeting
- 2 = Minimally Meeting
- 1 = Nearly Meeting
- 0 = Not Meeting / Incomplete / Unable to Compile
- Code (efficiency, comments, names): 6 marks
- 6 = Exceeding Expectations
- 5 = Fully Meeting
- 4 = Mostly Meeting
- 3 = Minimally Meeting
- 2 = Nearly Meeting
- 1 = Not Meeting / Unable to Compile
- 0 = Incomplete