Introduction
Build a command-line Hangman game! This project combines string manipulation, file I/O (loading words from a file), and game logic.
Requirements
- Select a random word from a word list (you can create a text file with words).
- Display the word as underscores and reveal letters as they're guessed.
- Track incorrect guesses and display a hangman figure.
- Allow the player to guess letters or the full word.
- Implement save/load functionality using JSON or pickle so the game can be resumed.
- The game should end when the word is guessed or the hangman is complete.
Hints
- Use
random.choice()to pick a word. - Use a set to track guessed letters.
- Use
jsonmodule for save/load.