Skip to content

SebaB29/HangmanGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Hangman Game 🏴‍☠️

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.

📜 Table of Contents

🕹️ Features

  • 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

🚀 Installation

To run this project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/SebaB29/hangman.git
  2. Navigate to the project directory:

    cd hangman
  3. Run the game:

    python main.py

🎮 Usage

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.

📷 Images

Img Hangman Img Ganaste Img Perdiste

📁 File Structure

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.

🛠️ Technologies

This project is built with:

  • Python
  • Gamelib (A library created by the instructor to facilitate the use of threads and rendering for the interface)

🤝 Contributing

Contributions are welcome! If you'd like to improve the game, feel free to fork the repository and submit a pull request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a pull request

📚 About This Project

This project is an implementation of the classic Hangman game in Python, focusing on game logic and graphical interface through structured programming principles.

📄 License

Distributed under the MIT License. See LICENSE for more information.

🔐 Security

If you discover a vulnerability, please review our Security Policy for guidance on reporting.

📜 Code of Conduct

Please read our Code of Conduct to understand expected behavior.

About

Hangman en Python: adivina la palabra antes de quedarte sin intentos.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Languages