Hangman
Thursday, November 13th, 2008 | Programs
For more including Author's Notes download the eBook pages with this program's code listing.
Hangman is a game that is so old and well known that it needs no introduction. Played by the French aristocracy it originally involved the drawing of a guillotine. The modern traditional gallows stemmed from when French settlers brought the game with them during the American western movement.
Actually I made that up. No one really seems to know where the game came from. But the rules are simple. Guess one letter at a time until you have the word, but take too many guesses and you lose.
The listing comes with a small dictionary of tough words but if you want to use your own vocabulary lists all you need to do is make a text file with a different word on each line and pass the name of the file to the program executable when you run it. (In windows you can simply drag and drop the text file into the program for the same result.)
This game draws a minimalistic picture that you can only see if you turn your head to the side. If you think you can do better rewrite drawgallows() to draw a different picture.
Hangman was written by Joseph Larson.
2 Comments to Hangman
Since I love to be the bearer of bad news! :)
The source code for this one is not displayable on the Mac!
November 16, 2008
Should be good now. thanks.
Leave a comment
Subscribe
Support Cymon's Games
Recent Comments
- Joe on Beginner’s Programming Homework
- Joe on ArrowFighter
- Devin Watson on ArrowFighter
- Joe on ArrowFighter
- Devin Watson on ArrowFighter
- Ken on Numbrix
- Joe on Sean Howard and Procedural Generation
- ejoyzamora on After Numbrix




November 14, 2008