Welcome to the Hangman game! This is a fun and interactive word-guessing game where you have to guess a secret word based on category selections. As you guess, you’ll have limited attempts before the game ends. Can you guess the word before you run out of tries? Let’s find out!
- Multiple Word Categories: Choose from different categories of words like Fruits, Vegetables, Countries, Cities, and Animals.
- Random Word Option: If you're feeling adventurous, you can let the game pick a random category for you.
- Interactive Gameplay: You’ll get to know your stats, including the current word length and remaining tries.
- Guess the Word: You are given a number of tries to guess the word, one letter at a time.
-
When you start the game, you'll be asked to choose a category from the following options:
- 0: Random
- 1: Fruits
- 2: Vegetables
- 3: Countries
- 4: Cities
- 5: Animals
-
Once you make your selection, the game will display a word with the number of characters as underscores (e.g., _ _ _ _).
-
You will have 6 chances to guess the word by typing in a letter. Each incorrect guess will reduce your remaining tries.
-
As you guess letters, the game will update and show the current state of the word (with correct guesses filled in).
-
You win if you guess the word within the allowed number of tries. If you run out of tries, the game will end.
==================================================================================
----------------------------------Welcome to Hangman Game-------------------------
==================================================================================
What type of words would you like to guess? Select from the given preferences.
Press '0' for 'Random'
Press '1' for 'Fruits'
Press '2' for 'Vegetables'
Press '3' for 'Countries'
Press '4' for 'Cities'
Press '5' for 'Animals'
Your Choice : 1
============================================================ Stats =============================================================
Word size : 4 ---- Remaining Tries : 6
=================================================================================================================================
Please guess the character in the word :
- Clone this repository to your local machine:
git clone https://github.com/Shaheryarkhalid/Hangman
- Navigate to the project folder:
cd Hangman
- Run the game:
python main.py
or simply
./main.py
Python 3.x
This project is licensed under the MIT License – see the LICENSE file for details.