hangman

guesses so far…

______

This hangman game was written in response to a recent job I applied for, for which I was asked to make a hangman game for a simple word list. The version you see above takes a random selection from five different word lists (boy’s names, girl’s names, cities, countries and interesting words). You can download the source code for the game here.

The game was written in PHP5, and uses jQuery to make the interface more responsive. If you switch Javascript off in your browser, you should see a simple text input box and a button for you to input your guesses. When jQuery loads, these are removed and event handlers put in place to run the game from keystrokes and communicate with the server via AJAX. The class has been extended for this example to incorporate the website header, and load the extra word lists.