CMPT 120 Assignment 2 Sample Hangman Game

This site applies only to CMPT 120 D1 (Burnaby) in Summer 2011. See the other instructors' pages for other sections.

Here is an idea of what a hangman game looks like when it's played by hand. The traditional picture of a stick figure hanging from gallows seems a little grim, so we'll take an idea from Bill's Games and use an unhappy smiley instead.

Losing Game

0 incorrect

I'm thinking of a seven letter word.
       

“Are there any Es in the word?”
1 incorrect

No Es! (1 wrong)
       

“Are there any As in the word?”
1 incorrect

Two As.
 A   A 

“Are there any Ts in the word?”
2 incorrect

No Ts! (2 wrong)
 A   A 

“Are there any Rs in the word?”
3 incorrect

No Rs! (3 wrong)
 A   A 

“Are there any Ns in the word?”
3 incorrect

Two Ns.
 AN  AN

“Are there any Ks in the word?”
4 incorrect

No Ks! (4 wrong)
 AN  AN

“Are there any Ss in the word?”
5 incorrect

No Ss! (5 wrong)
 AN  AN

“Are there any Ms in the word?”
5 incorrect

One M.
 AN MAN

“Are there any Ps in the word?”
6 incorrect

No Ps! Game Over! (6 wrong)
HANGMAN

Winning Game

0 incorrect

I'm thinking of a three letter word.
   

“Are there any Es in the word?”
0 incorrect

One E.
  E

“Are there any Ss in the word?”
1 incorrect

No Ss! (1 wrong)
  E

“Are there any Ts in the word?”
1 incorrect

One T.
T E

“Are there any Hs in the word?”
1 incorrect

One H. You got it!
THE