Skip to content

Implemented Hangman game in Python.#89

Open
naman648 wants to merge 1 commit intoHarshSharmaIN:mainfrom
naman648:main
Open

Implemented Hangman game in Python.#89
naman648 wants to merge 1 commit intoHarshSharmaIN:mainfrom
naman648:main

Conversation

@naman648
Copy link

Working process/flow:

  • Word Selection: A random word is chosen from a list of words.
  • Game Loop:
  1. The player is shown their remaining lives and used letters.
  2. The current state of the word is displayed, with guessed letters shown and unguessed letters as underscores.
  3. The player guesses a letter.
  4. If the letter is correct, it's removed from the word's letter set.
  5. If the letter is incorrect, the player loses a life.
  • Win/Lose Condition:
  1. If all letters are guessed, the player wins.
  2. If the player runs out of lives, they lose.

Working process/flow:
- Word Selection: A random word is chosen from a list of words.
- Game Loop:
1. The player is shown their remaining lives and used letters.
2. The current state of the word is displayed, with guessed letters shown and unguessed letters as underscores.
3. The player guesses a letter.
4. If the letter is correct, it's removed from the word's letter set.
5. If the letter is incorrect, the player loses a life.
- Win/Lose Condition:
1. If all letters are guessed, the player wins.
2. If the player runs out of lives, they lose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments