Skip to content

SebaB29/HangmanGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

๐Ÿดโ€โ˜ ๏ธ Hangman Game

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!

๐Ÿ“ธ Demo

Hangman Gameplay Victory Screen Game Over Screen

๐Ÿ“ Table of Contents

๐Ÿ“ Description

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.

๐Ÿงฉ Key Features

  • 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.

๐Ÿงฑ Project Structure

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

๐Ÿ› ๏ธ Technologies

  • Python 3.x
  • Gamelib: A lightweight thread-based rendering library for Python interfaces.

๐Ÿš€ Getting Started

๐Ÿ“‹ Prerequisites

  • Python 3.10 or higher installed on your system.

โš™๏ธ Installation

  1. Clone the repository:
    git clone git@github.com:SebaB29/HangmanGame.git
    cd hangman

๐Ÿ’ก Usage

To start the game, simply run the main script:

python main.py
  1. Once the game starts, a hidden word is represented by underscores.
  2. Type a letter on your keyboard to make a guess.
  3. If the letter is in the word, it will be revealed.
  4. If not, the hangman drawing will progress.
  5. Guess the whole word before the hangman is complete to win!

๐Ÿค Contributing

  1. Fork the project.
  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.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

๐ŸŽฎ Interactive Hangman engine built with Python. Featuring dynamic word selection from external resources, custom life systems, and a lightweight graphical interface.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors

Languages