This project includes a GUI for the hangman game using PySimpleGUI. The game logic is implemented in Python and connected to the GUI, allowing players to enjoy a visually engaging version of hangman.
Hangman is a classic word-guessing game where players try to guess a hidden word by suggesting letters. This project aims to create a GUI version of hangman using PySimpleGUI, making the game more interactive and visually appealing.
- Players: Two or more players. In this version, the computer will be the selecting player, and one human will be the guessing player.
- Word Selection: The computer selects a word, represented by underscores for each letter.
- The player guesses letters one at a time.
- Correct guesses reveal the letter in the word.
- Incorrect guesses add a part to the hangman drawing (head, torso, arms, legs).
- The player wins if they guess the word correctly.
- The computer wins if the hangman drawing is completed after six incorrect guesses.
- Interactive GUI: Built using PySimpleGUI, the interface is user-friendly and visually appealing.
- Game Logic: Handles word selection, letter guessing, and hangman drawing.
- Feedback: Provides immediate feedback on guessed letters and updates the display accordingly.
- Game Outcome: Manages game end conditions and offers options to restart or quit.
- Clone the repository:
git clone https://github.com/yourusername/hangman-pysimplegui.git
- Change to the project directory:
cd hangman-pysimplegui
- Install the required dependencies:
pip install PySimpleGUI
- Run the game:
python hangman.py
- Use the GUI to guess letters and try to complete the word before the hangman is fully drawn.