CS 106A Hangman!
I will think of a random word.
You'll try to guess its letters.
Every time you guess a letter
that isn't in my word, a new body
part of the hanging man appears.
Guess correctly to avoid the gallows!

Secret word : ----------
Your guesses: 
Guesses left: 8
Your guess? r
Correct!
Secret word : -R--R----R
Your guesses: R
Guesses left: 8
Your guess? s
Incorrect.
Secret word : -R--R----R
Your guesses: RS
Guesses left: 7
Your guess? t
Incorrect.
Secret word : -R--R----R
Your guesses: RST
Guesses left: 6
Your guess? p
Correct!
Secret word : PR--R----R
Your guesses: RSTP
Guesses left: 6
Your guess? x
Incorrect.
Secret word : PR--R----R
Your guesses: RSTPX
Guesses left: 5
Your guess? o
Correct!
Secret word : PRO-R----R
Your guesses: RSTPXO
Guesses left: 5
Your guess? n
Incorrect.
Secret word : PRO-R----R
Your guesses: RSTPXON
Guesses left: 4
Your guess? g
Correct!
Secret word : PROGR----R
Your guesses: RSTPXONG
Guesses left: 4
Your guess? y
Incorrect.
Secret word : PROGR----R
Your guesses: RSTPXONGY
Guesses left: 3
Your guess? m
Correct!
Secret word : PROGR-MM-R
Your guesses: RSTPXONGYM
Guesses left: 3
Your guess? d
Incorrect.
Secret word : PROGR-MM-R
Your guesses: RSTPXONGYMD
Guesses left: 2
Your guess? e
Correct!
Secret word : PROGR-MMER
Your guesses: RSTPXONGYMDE
Guesses left: 2
Your guess? a
Correct!
You win! My word was "PROGRAMMER".
