A simple hangman game built in python2 and pygame.
- The program randomly picks a word from
VocabHungmanGame.txt
. - The user types one letter at a time to guess the word
- The user is allowed to make eight incorrect guesses.
- python2
- pygame
- Close this repo
python HangmanGame.py
to start the game
Installing a pygame is tricky. If you are using anaconda
, you can try conda install pygame
.
If you get a following error:
Error: from pygame.base import * ImportError: dlopen
.....
...SDL Error - missing/usr/local/lib/libSDL-1.2.0.dylib...
....
You can try pip install pygame
if you could not load an image (with the following error)
pygame.error: Failed loading libpng.dylib: dlopen(libpng.dylib, 2): image not found
You can try, brew install libpng
Reference: MacBook Python Pygame Anaconda – issues