A word guessing game msde using the Pygame library in Python [It contains a lot of bugs].
When the game starts, a word is selected at random from a list of words. The player's objective is to guess the word by selecting letters from the alphabet.
The player has 11 attempts to guess the word. For every incorrect guess, a body part of the hangman is drawn on the screen. If the player runs out of attempts before guessing the word, the hangman is fully drawn, and the game is over. Otherwise, the player wins the game by guessing the word before the hangman is fully drawn.
Randomly selects a word from a list of words.
Allows the player to guess letters from the alphabet.
Displays the body parts of the hangman as the player makes incorrect guesses.
Informs the player whether they won or lost the game.
Plays background music while the game is running.
The game depends on the following libraries:
Pygame
To play the game, first install Pygame using pip:
pip3 install pygame
Run the HangManGame_code.py file or the following command in the terminal :
python3 HangManGame_code.py
This game was developed by Omanshu.