Welcome to Hangman, a classic word-guessing game implemented in Python. Test your vocabulary and save the pirate by guessing the hidden word letter by letter before you run out of attempts!
This project focuses on structured programming and resource management. It implements the classic hangman mechanics where words are randomly selected from a data source, and the game state is updated dynamically based on user input.
- Dynamic Word Selection: Words are randomly picked from a predefined list in
resource/palabras.py. - Life System: Visual representation of the hangman that updates with every incorrect guess.
- Input Handling: Real-time processing of keyboard inputs to reveal hidden letters.
- Win/Loss States: Custom screens for victory and defeat.
Hangman/
โโโ graphics/ # UI rendering and Gamelib integration
โโโ img/ # Gameplay screenshots (Win/Loss/Game)
โโโ resource/ # Word database (palabras.py)
โโโ src/ # Core logic (ahoracado.py and letter handling)
โโโ main.py # Entry point
โโโ LICENSE # MIT License
- Python 3.x
- Gamelib: A lightweight thread-based rendering library for Python interfaces.
- Python 3.10 or higher installed on your system.
- Clone the repository:
git clone git@github.com:SebaB29/HangmanGame.git cd hangman
To start the game, simply run the main script:
python main.py- Once the game starts, a hidden word is represented by underscores.
- Type a letter on your keyboard to make a guess.
- If the letter is in the word, it will be revealed.
- If not, the hangman drawing will progress.
- Guess the whole word before the hangman is complete to win!
- Fork the project.
- Create your Feature Branch (git checkout -b feature/AmazingFeature).
- Commit your changes (git commit -m 'Add some AmazingFeature').
- Push to the Branch (git push origin feature/AmazingFeature).
- Open a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.


