Skip to content

Digao075/hangman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐍 Python Hangman

A clean, modular implementation of the classic Hangman game built with Python 3. This project demonstrates proficiency in Python control flow, data structures (Sets/Lists), and command-line interface (CLI) design.

πŸš€ Key Features

  • Efficient Logic: Utilizes Python set() operations for O(1) complexity when tracking used letters and validating guesses.
  • Modular Architecture: Separates game logic (hangman.py) from data sources (words.py, hangman_visual.py) to ensure code maintainability.
  • Input Sanitization: Robust handling of user inputs to prevent crashes from invalid characters or repeated guesses.
  • Dynamic Visuals: Integrates ASCII art to provide real-time visual feedback on the player's status.
  • Data Cleaning: Filters out unsuitable words (containing hyphens or spaces) from the dataset before the game starts.

πŸ› οΈ Project Structure

β”œβ”€β”€ hangman.py           # Main game logic and controller
β”œβ”€β”€ words.py             # Dataset of potential words
β”œβ”€β”€ hangman_visual.py    # Dictionary containing ASCII art states
└── README.md            # Project documentation

About

A robust, command-line Hangman implementation in Python 3. Features modular design with separate data sources, input validation, and dynamic visual state management. Demonstrates set operations for efficient logic handling.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages