Welcome to Hangman, a classic word-guessing game where players try to guess a hidden word by suggesting letters within a limited number of attempts. This project is an implementation of the Hangman game in Python, utilizing structured programming principles.
- Features
- Installation
- Usage
- Images
- File Structure
- Technologies
- Contributing
- About This Project
- License
- Security
- Code of Conduct
- Classic Hangman gameplay with word guessing
- Limited attempts to guess the word
- Random word selection from a predefined list
- Intuitive graphical interface with keyboard controls
To run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/SebaB29/hangman.git
-
Navigate to the project directory:
cd hangman -
Run the game:
python main.py
To play the game, type a letter into the input field and press Enter. You have a limited number of incorrect guesses before the game is over. The goal is to guess the hidden word before running out of attempts.
The project structure is as follows:
Hangman/
├── .github/
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── SECURITY.md
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ └── PULL_REQUEST_TEMPLATE.md
├── graphics/
│ ├── gamelib.py
│ └── inter_gráfica.py
├── img/
│ └── [3 demo images of the game]
├── resource/
│ └── palabras.py
├── src/
│ ├── ahoracado.py
│ └── letra.py
├── .gitignore
├── LICENSE
├── main.py
└── README.md
- graphics/: Contains libraries for rendering the game (gamelib and graphical logic).
- img/: Includes demo images showcasing the game's functionality.
- resource/: Contains a file with a list of words (
palabras.py) that can be used in the game. - src/: Contains the source code files for game logic (ahoracado and letter handling).
- main.py: The entry point of the application.
This project is built with:
- Python
- Gamelib (A library created by the instructor to facilitate the use of threads and rendering for the interface)
Contributions are welcome! If you'd like to improve the game, feel free to fork the repository and submit a pull request.
- Fork the repository
- 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 an implementation of the classic Hangman game in Python, focusing on game logic and graphical interface through structured programming principles.
Distributed under the MIT License. See LICENSE for more information.
If you discover a vulnerability, please review our Security Policy for guidance on reporting.
Please read our Code of Conduct to understand expected behavior.


