# &kblackbox; Game Manual

Robert
Cimrman

    cimrman3@students.zcu.cz

Philip
Rodrigues

    phil.rod@ntlworld.com

Robert
Cimrman

    cimrman3@students.zcu.cz

Developer
Lauri
Watts

    lauri@kde.org

Reviewer
1998
2000
Robert Cimrman
2001
2002
Philip Rodrigues
&FDLNotice;
2002-02-15
0.03.00

&kblackbox; is a superb graphical logical game, inspired by the emacs blackbox.

KDE
KBlackBox
kdegames
blackbox
game

## What is &kblackbox;?

&kblackbox; is a superb :-) graphical logical game, inspired by the emacs blackbox. Major part of this help file is based on the original emacs's help.

&kblackbox; is a game of hide and seek played on an grid of boxes. Your opponent (the Random number generator, in this case) has hidden several balls within this box. By shooting rays into the box and observing where they emerge it is possible to deduce the positions of the hidden balls. The fewer rays you use to find the balls, the better (the lower) your score.

## Game description

In the first part of this section a description of the game board will be given. The second part deals with user interaction with the game board and finally in the third part the actual game rules are explained.

### Game board description

The following types of field are found on the game board:

Black squares

  The black box. Here you must mark the squares you think a ball is in.

Green squares

  These are the lasers, shooting rays of light when switched on.

Light Grey squares

  Nothing here of interest, this is just a border :-).

Blue balls

  There must be one! you think. These mark where you suspect a ball is placed in the black box.

Cyan balls

  Show where the balls actually are.

Red balls

  Incorrectly positioned balls you have marked are indicated in red.

Brown squares

  Marking color

The names of colors are used just for identifying the different types of the fields in this text. They might not be in any relation with the actual color of the fields. Simply said: the black box is in the centre, around are the lasers and around them is the border. Remap the colors yourself :-).

### User Interaction

The cursor can be moved around the box with the standard cursor movement keys or the mouse. Switching of lasers or marking of black boxes is done by the left mouse button, or by pressing Return or Enter keys.

You can mark the fields where you think a ball can't be, too. Just press the right mouse button. It often helps you to find an area where a ball could possibly be. To clear any marks (blue or brown) press the left mouse button. Brown marks can't overwrite blue marks. This way you can't erase the blue marks (guessed balls) by accident when playing with the right mouse button.

When you think the configuration of balls you have placed is correct, press the middle mouse button. You will be informed whether you are correct or not, and be given your score. Your score is the number of letters and numbers around the outside of the box plus five for each incorrectly placed ball. If you placed any balls incorrectly, they will be indicated with red fields, and their actual positions indicated with cyan fields.

### Game rules

You have to find balls hidden in the black box. Your means are limited - you can just fire lasers which are around the box. There are three possible outcomes for each ray you send into the box:

Detour

  The ray is deflected and emerges somewhere other than where you sent it in. On the playfield, detours are denoted by matching pairs of numbers - one where the ray went in, and the other where it came out.

Reflection

  The ray is reflected and emerges in the same place it was sent in. On the playfield, reflections are denoted by the letter R.

Hit

  The ray strikes a ball directly and is absorbed. It does not emerge from the box. On the playfield, hits are denoted by the letter H.

The rules for how balls deflect rays are simple and are best shown by example.

As a ray approaches a ball it is deflected ninety degrees. Rays can be deflected multiple times. In the diagrams below, the dashes represent empty box locations and the letter O represents a ball. The entrance and exit points of each ray are marked with numbers as described under Detour above. Note that the entrance and exit points are always interchangeable. * denotes the path taken by the ray.

Note carefully the relative positions of the ball and the ninety degree deflection it causes.

        1
      - * - - - - - -         - - - - - - - -         - - - - - - - -
      - * - - - - - -         - - - - - - - -         - - - - - - - -
    1 * * - - - - - -         - - - - - - - -         - O - - - - O -
      - - O - - - - -         - - O - - - - -         - - * * * * - -
      - - - - - - - -         - - - * * * * * 2     3 * * * - - * - -
      - - - - - - - -         - - - * - - - -         - - - O - * - -
      - - - - - - - -         - - - * - - - -         - - - - * * - -
      - - - - - - - -         - - - * - - - -         - - - - * - O -
                                    2                         3

As mentioned above, a reflection occurs when a ray emerges from the same point it was sent in. This can happen in several ways:

      - - - - - - - -         - - - - - - - -          - - - - - - - -
      - - - - O - - -         - - O - O - - -          - - - - - - - -
    R * * * * - - - -         - - - * - - - -          O - - - - - - -
      - - - - O - - -         - - - * - - - -        R - - - - - - - -
      - - - - - - - -         - - - * - - - -          - - - - - - - -
      - - - - - - - -         - - - * - - - -          - - - - - - - -
      - - - - - - - -       R * * * * - - - -          - - - - - - - -
      - - - - - - - -         - - - - O - - -          - - - - - - - -

In the first example, the ray is deflected downwards by the upper ball, then left by the lower ball, and finally retraces its path to its point of origin. The second example is similar. The third example is a bit anomalous but can be rationalized by realizing the ray never gets a chance to get into the box. Alternatively, the ray can be thought of as being deflected downwards and immediately emerging from the box.

A hit occurs when a ray runs straight into a ball:

      - - - - - - - -         - - - - - - - -          - - - - - - - -
      - - - - - - - -         - - - - - - - -          - - - - O - - -
      - - - - - - - -         - - - - O - - -        H * * * * - - - -
      - - - - - - - -       H * * * * O - - -          - - - * - - - -
      - - - - - - - -         - - - - O - - -          - - - O - - - -
    H * * * O - - - -         - - - - - - - -          - - - - - - - -
      - - - - - - - -         - - - - - - - -          - - - - - - - -
      - - - - - - - -         - - - - - - - -          - - - - - - - -

Be sure to compare the second example of a hit with the first example of a reflection.

## GUI description

### The Game menu

Game New

  Starts a new game (and abandons the current, if any.)

Game Give Up

  Shows you positions of the balls.

Game Done

  Checks whether all balls are placed. If yes, it terminates the current game, computes the final score and indicates real positions of the balls. The middle mouse button has the same function.

Game Resize

  Resizes the main window, so that it fits perfectly its contents. This is useful, when you accidentally change the size of the window...

Game Quit

  Quits &kblackbox;

### The Settings menu

Settings Size

  Sets the size of the game field (black box.) You may choose between 8 x 8, 10 x 10 and 12 x 12. The default is 8 x 8

Settings Balls

  Sets the number of balls in the black box. You may choose between 4 (the default), 6 or 8.

Settings Tutorial

  Switches on or off the tutorial mode. In tutorial mode, you can see where the balls actually are. Note that you have to start a new game for this change to take effect.

### The Help Menu

&help.menu.documentation;

### The Toolbar

&kblackbox;'s toolbar

The &kblackbox; toolbar offers quick access to the most commonly used &kblackbox; functions. From left to right, the icons are:

Quit

  Quits &kblackbox;

New

  Starts a new game.

Give Up

  Shows you positions of the balls.

Done

  Checks whether all balls are placed. If yes, it terminates the current game, computes the final score and indicates real positions of the balls. The middle mouse button has the same function.

## Credits and License

&kblackbox;

Copyright 1998-2000 Robert Cimrman, cimrman3@students.zcu.cz

Documentation by Robert Cimrman. Updated and converted to Docbook for KDE 2.0 by Lauri Watts lauri@kde.org

Current maintainer Philip Rodrigues phil.rod@ntlworld.com

&underFDL; &underGPL;

## Installation

&install.intro.documentation;

### Compilation and Installation

&install.compile.documentation;