The computers in my college's computer lab have borland C++ and MS visual studio. At home I have a mac.
Here is the assignment:
For this assignment your are to write a program, using strings (from the string class) that plays
the popular game of Hangman. See the Wikipedia definition if
you have never played the game:
http://en.wikipedia.org/wiki/Hangman_(game).
Here is how the program should work:
The word, phrase or sentence will be read in from a file called hangman.txt.
There will be only one word, phrase or sentence per line. The user guesses
will be done via the keyboard.
(1) The program should display the line by hiding all letters (a-z, A-Z)
with a '-' (dash). All other characters should be displayed normally.
(2) The program should ask the player to make a guess.
(3) If the player makes a correct guess then the program should
redisplay the word, phrase or sentence with the letter displayed and ask
the player to make another guess
(4) If the palyer makes an incorrect guess then the program should tell
the player the guess was incorrect, subtract a guess and tell the user how
many guesses remain.
(5) If no more guesses remain then the program should print a message stating
that the game is over and displaying the original word, phrase or sentence.
(6) If more guesses remain then the program should ask the player to guess
again.