C++ Hangman Lose

> clang++-7 -pthread -std=c++17 -o main main.cpp
> ./main
55909 words loaded
This is hangman, you want to play?
I’m thinking of a word that is 6 letters long.
Current guess: _ _ _ _ _ _
Available letters:abcdefghijklmnopqrstuvwxyz
Guess a letter? z
Sorry, z is not in the word.
You only have 7 chance(s) to guess the right letters
Current guess: _ _ _ _ _ _
Available letters:abcdefghijklmnopqrstuvwxy
Guess a letter? d
Sorry, d is not in the word.
You only have 6 chance(s) to guess the right letters
Current guess: _ _ _ _ _ _
Available letters:abcefghijklmnopqrstuvwxy
Guess a letter? p
Sorry, p is not in the word.
You only have 5 chance(s) to guess the right letters
Current guess: _ _ _ _ _ _
Available letters:abcefghijklmnoqrstuvwxy
Guess a letter? a
Good guess!
Current guess: _ _ _ _ a_
Available letters:bcefghijklmnoqrstuvwxy
Guess a letter? i
Sorry, i is not in the word.
You only have 4 chance(s) to guess the right letters
Current guess: _ _ _ _ a_
Available letters:bcefghjklmnoqrstuvwxy
Guess a letter? e
Good guess!
Current guess: _ e_ _ a_
Available letters:bcfghjklmnoqrstuvwxy
Guess a letter? o
Sorry, o is not in the word.
You only have 3 chance(s) to guess the right letters
Current guess: _ e_ _ a_
Available letters:bcfghjklmnqrstuvwxy
Guess a letter? w
Sorry, w is not in the word.
You only have 2 chance(s) to guess the right letters
Current guess: _ e_ _ a_
Available letters:bcfghjklmnqrstuvxy
Guess a letter? v
Sorry, v is not in the word.
You only have 1 chance(s) to guess the right letters
Current guess: _ e_ _ a_
Available letters:bcfghjklmnqrstuxy
Guess a letter? c
Sorry, c is not in the word.
You lost! The word was:german
>

Scroll to Top