A fun multiplayer hangman game built with Python! 🐍
This hangman game can be played by 2 players. One player will think of a secret word, and the other tries to guess it letter by letter before running out of guesses!
As guesses are made:
- Correct guesses will fill in the matching letters
- Incorrect guesses deduct a life
- Run out of lives before guessing the word? You lose!
The first player to correctly guess their opponent's secret word wins the round. Scores are tracked over multiple rounds to determine an overall winner.
- Python - The programming language used
- Random module - To randomly select secret words
- User input - To get letter guesses from players
The program:
- Prompts each player for their name
- Randomly assigns a secret word from a list
- Prints the word with blanks for unknown letters
- Gets letter guesses and checks them
- Updates the printed word and counts lives
- Checks for a win/loss condition after each turn
- Switches players and repeats until a winner is determined
To run the game:
- Install Python
- Clone this repo
- Run python hangman.py
- Follow the prompts to play!
Created by Atthaluri Shashank - feel free to contact me if you have any other questions!