ECE222(2007Fall)Prog11(Hangman)

ECE222(2007Fall)Prog11(Hangman) - Fall 2007 ECE 222 System...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Fall 2007 ECE 222 System Programming Concepts 1 of 2 Lab 11 – Hangman In this lab, each student is to write a single program called prog11.c which simulates the game Hangman . The program should use the curses library for character graphics and the linux dictionary and rand () to select words. Input The program accepts the following input at the opening menu: new – Starts a new game. quit – Exit the program. Invalid commands should produce a suitable error message. Operation When a new game is started, the program should randomly select a word from the dictionary and indicate the appropriate number of letters in the selected word with spaces on the screen: selected word: implement console display: _ _ _ _ _ _ _ _ _ Across the bottom of the screen, the alphabetical characters should be listed, grouped in vowels and constants. An indicator of the number of strikes should also be displayed (the game should start with zero strikes; the game is over when the player has 6 strikes). Finally, a timer should be started. The player will have 6 seconds to make a guess; if a
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

ECE222(2007Fall)Prog11(Hangman) - Fall 2007 ECE 222 System...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online