Summary: CS 2420 Fall 2011
Program 1 20 points See webpage for due date.
In case you are not familiar with the game Hangman, the rules are as follows:
1. The computer chooses a secret word, and then writes out a number of dashes equal to the word
2. The player begins guessing letters. Whenever he guesses a letter contained in the hidden word, the
computer reveals each instance of that letter in the word. Otherwise, the guess is wrong.
3. The game ends either when all the letters in the word have been revealed or when the guesser has
run out of guesses.
A version of this game has been provided as starter code. The code uses doubly linked lists so that (1)
you are exposed to them (2) pointers are reviewed. Avoid using google to find a more complete
version. You need to be able to code without copying.
Your assignment is to create a version of the game in which the computer cheats.
The trick is this: the computer does not pick a word until it absolutely has to. The game begins
with the computer selecting a word length, but not a word.
When you guess a letter (let's say you guess the letter 'N'), the computer consults its word list to