A Python implementation of the classic Hangman game, allowing players to guess a word by selecting letters. This version includes adjustable difficulty levels and an external word list for added variety.
- Three Difficulty Levels: Choose between easy, medium, and hard, where difficulty determines the length of the word.
- Random Word Selection: Words are chosen randomly from an external file (
hangman_words.txt
). - ASCII Hangman Graphics: Visual hangman graphics display with each incorrect guess.
- Clone this repository or download the files.
- Ensure
hangman.py
andhangman_words.txt
are in the same directory. - Run the game with Python:
python hangman.py
- Follow the on-screen prompts to guess letters and try to reveal the word before reaching the maximum number of incorrect guesses.
hangman.py
: The main Python script that runs the game.hangman_words.txt
: A text file containing a list of words for the game.
Choose a difficulty level (easy, medium, hard): medium
**********
Current word: _ a _ _ _ _
Guessed letters:
Enter a letter: e
To customize the game, you can add, remove, or modify words in hangman_words.txt
. Each word should be on a new line.