# The &khangman; Handbook

Anne-Marie
Mahfouf

    annma@kde.org

2001
Anne-Marie Mahfouf
&FDLNotice;
2001-10-31
0.7.1

&khangman; is the classical hangman game for children adapted for &kde;.

KDE
kdeedu
KHangMan
child
words

## 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 id 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

&Ctrl;Q or &Alt;Q enables you to quit the game (as well as clicking on the Quit button), F1 or &Alt;H gives you this Help (or click on the Help button) and &Alt;I brings you the quick info screen. To choose the level, click on the 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 (&eg; &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=/your_kde_dir``, ``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 easiest way is to configure KHangman with the option --prefix=/your_kde_dir where /your_kde_dir can be /opt/kde or /usr, depending of the distribution.

## 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

&khangman; is part of the KDE and KDE-Edu project http://edu.kde.org.

### Requirements

In order to successfully use &khangman;, you need KDE 2 and Qt2 on your system.

&khangman; can be found on The &khangman; home page.

### Compilation and installation

In order to compile and install KHangMan on your system, type the following in the base directory of the KHangMan distribution:

    % ./configure
    % make
    % make install

Since KHangMan uses autoconf and automake you should have not trouble compiling it. Should you run into problems please report them to the KDE mailing lists.

&documentation.index;