HTML and JavaScript for BlackBox © Copyright 2004 by James Larson
BlackBox
Instructions User Controls Explained
How to Play

BlackBox is played on an 8 x 8 square grid. Inside the grid, a user specified number of atoms are placed at random by the computer. The user then tries to determine the location of those atoms.

The user may click any of the 32 numbered buttons around the grid. That causes a ray to be shot into the box from the associated side. As the ray encounters atoms inside the box, the following rules are applied:

1Rays that strike an atom directly are absorbed.
2Rays that come within one square of an atom such that it would pass right by if it were to continue, are deflected 90° away from the atom.
3Rays aimed between two atoms one square apart are reflected.
4Rays that enter on either side of an atom at the edge are reflected.
5Rays otherwise travel in straight lines.

Please examine the graphic below. Each of these rules are illustrated by it.

Ray EntersRay ExitsDescription
2
2
Reflected by two atoms.
7
9
Deflected by one atom.
21
4
Deflected by three atoms.
22
--
Absorbed by an atom.
28
28
Reflected by atom on the edge.


User Controls Explained
... Each of these numbered buttons fires rays into the BlackBox.
Each of the boxes around the outer edge receives the number where the ray comes out. Blank boxes indicate rays that have not yet been fired.
Stands for "REflected." Indicates that the ray came out the same place it went in.
Stands for "ABsorbed." Indicates that the ray went in but did not come out.
An unmarked atom position.
A marked atom position. If it corresponds to one of the randomly placed atoms the computer holds secret, it will be counted as "correct" when the user clicks on
Begins a new game.
Counts the number of marked atoms that are in the correct position. If the number correct is the same as the number appearing in the Number of atoms box, the game is finished.
Reveals the position of all atoms and ends the game.
Practice Mode Checking this box allows the user to practice setting up attoms on the grid and firing rays to see what happens. These games are not counted.

Visitor #

This classic computer game has been written and distributed by

James Larson
Programmer/Analyst Consultant
http://www.dst-corp.com/james
E-mail address
In God We Trust...