# The &khangman; Handbook

## Introduction

&khangman; is a game based on the well known hangman game. It is aimed for children aged 6+. It has four levels of difficulty. A word is picked in random, the letters are hidden, you must guess the word by trying a letter after another. Each time you guess a wrong letter, a picture of a hangman is drawn. You must guess the word before getting hanged! You have 9 tries.

My son Joachim, 9 and a half years old, gave me the idea of that game in June 2000.

## Using &khangman;

Here's a screenshot of &khangman; &khangman; screenshot

### General usage

A word is displayed, hidden. You have to guess what the word is by trying a letter after another. The word is picked in random. There are 44 different words in each level.

All words are nouns and in small letters.

Each time you start the game, the default is easy.

Each time you guess a letter that is not in the word, the hangman is drawn a little further. You have 10 tries to guess the word. After that, the word is displayed.

There are 4 levels : easy, medium, hard and animals :

In the easy level, the words are quite simple, related to everyday life. It is suitable for children from 6 to 9. The animals level contains only names of animals so they can be easier to find. Some of them are easy, others are more difficult. In the medium level, the words are longer and more difficult. It is suitable for 9+. The hard level is ...hard, &ie; the words are difficult to spell and not very well known. Challenging, even for adults.

After a word is guessed (or the hangman is completed), you are prompted for another word and you can either use the Y or N keys or the mouse to answer yes or not.

### A few tips

Try to guess the vowels first. Then have a go with the most common consonants : l, t, r, n, s

When you see io, try n after that.

Did you know? In English, the most common letter is e (12.7%), followed by t (9.1%) then a (8.2%), i (7.0%) and n (6.7%).

## Command Reference

### The Main &khangman; Window

Clicking on the Close button) allows you to exit the game. Click on the Help to access this handbook. To choose the level, choose from the drop down box labelled Level button.

## Developer's Guide to &khangman;

### How to change the words for the game

Download the `tar.gz` file of the latest version of &khangman;. Unpack it in a directory (`/usr/local/bin` for example). The words are stored in 4 separate files, one for each level. The files are in `/khangman/data`. The file `easy.txt` is for level easy, the file `level2.txt` is for level medium, the file `level3.txt` is for level animals and the file `level4.txt` is for level hard.

Edit one of the file with your favorite editor (⪚ &kedit; or &kate; or Emacs). Change the words by putting one word a line, the maximum letters in the word should be 12.

The 4 text files have each 44 words (that is 44 lines with a word per line). If you change that number, please do so for each of these files so they all have the same number of lines/words. Then, in `khangman.cpp`, correct the first int that is declared which is called wordsnum.

    int wordsnum=your_new_number_of_words;

Save the file and do a ``make` `install`` as `root` to install the file correctly if you already compiled the game. If not, ``./configure` `--prefix=$`KDEDIR```, ``make`` and ``make` `install`` in a terminal.

## Questions and Answers

&reporting.bugs; &updating.documentation;

I have an error message telling me the pictures cannot be found.

The game installs by default in `/usr/local/kde` so add `/usr/local/kde/bin` to your path and set the `KDEDIR` variable to `/usr/local/kde` before running the game. An easy way is to configure &khangman; with the option `--prefix`=$`$KDEDIR` where $`KDEDIR` is where the rest of &kde; is installed. This could vary widely, depending on the distribution and operating system you.

## Credits and License

&khangman;

Program copyright 2001 Anne-Marie Mahfouf annma@kde.org

Contributors:

- graphics: Renaud Blanchard kisukuma@chez.com

- sounds: Ludovic Grossard ludovic.grossard@libertysurf.fr

- splashscreen: Primoz Anzur zerokode@yahoo.com

Documentation copyright 2001 Anne-Marie Mahfouf annma@kde.org

&underFDL; &underGPL;

## Installation

### How to obtain &khangman;

&install.intro.documentation;

### Compilation and installation

&install.compile.documentation;
&documentation.index;