Magic Eight Ball

magic eightball info

The Magic 8-Ball, manufactured by Mattel, is a toy used for fortune-telling. Invented by Abe Bookman in 1946 of the Alabe Toy Company, it is a hollow, plastic sphere resembling an oversized, black and white 8-ball. The fortunes are given by a white plastic die in the shape of an icosahedron, floating in a blue liquid, with answers to yes-no questions in raised letters on its 20 triangular faces. There is a transparent window on the bottom of the 8-ball, and when the ball is held so that the window faces up, the die floats to the top randomly exposing one of its faces in the window. As the raised white letters press against the window, they drive the dark blue liquid to the sides, away from the raised letters, so that the letters appear as white print on a still-dark-blue background (where a thin layer of fluid remains between the raised letters).
- From Wikipedia

about my magic eightball

This is my take on the magic eightball, just a simple way to practice Ajax, the first complete program I ported from plain old cgi to Ajax. The program itself is quite simple, since the answer of a magic eightball just has a predetermined range of random answers, the likeliness of one answer appearing the same as previous is about the same as the chance of flipping a coin...

buy a magic eightball

There are probably plenty of websites where you can buy a real magic eight ball, the real thing is of course more fun than a random number generator :)