This Hangman Game is a classic word guessing game developed in Python. The game allows players to test their word-guessing skills by trying to figure out a secret word, one letter at a time, before running out of attempts.
-
Random Word Selection: The game selects a random word from a predefined list of words, ensuring a new and unique challenge with each playthrough.
-
User Input Validation: The program validates user inputs, ensuring that only single alphabetic characters are accepted. It also prevents repeated guesses by keeping track of letters already guessed by the player.
-
Visual Representation: The game provides a visual representation of the hangman, updating it with each incorrect guess. This feature adds an interactive and engaging element to the gameplay.
-
Difficulty Levels: The game offers multiple difficulty levels, allowing players to choose between easy, medium, and hard. The difficulty level determines the length of the secret word and the number of attempts available.
-
Score Tracking: The game keeps track of the player's score, recording the number of wins and losses. This feature allows players to challenge themselves to improve their performance.
-
User-Friendly Interface: The game provides a simple and intuitive command-line interface, making it easy for players to interact with the program and enjoy the gameplay.
-
Clone the repository or download the source code files to your local machine.
-
Make sure you have Python installed on your system.
-
Open a terminal or command prompt and navigate to the directory where the game files are located.
-
Run the following command to start the game:
-
Copy code
python hangman.py
-
Follow the on-screen instructions to play the game. Guess letters one at a time and try to uncover the secret word.
-
If you want to quit the game at any time, simply press Ctrl + C or close the terminal window.
This Hangman Game is licensed under the MIT License. You are free to use, modify, and distribute the code as per the terms of the license.
- The Hangman game is built using the Python programming language.
- The project structure and code organization are inspired by best practices for Python projects.
Contributions to the Hangman Game project are welcome! If you encounter any issues or have ideas for improvements, feel free to open an issue or submit a pull request on the GitHub repository.
If you have any questions, suggestions, or issues, please feel free to contact the project maintainer at bsce21027@itu.edu.pk
Enjoy Playing Hangman!