ObjectAda(tm) supports Microsoft and
JavaSoft virtual machine technology


The Game of Mancala, written in Ada 95

If you are using the Internet Explorer 3.01 or Netscape 2.0 browsers you can see the ancient game of "Mancala" running as a rather more modern Ada 95/Java applet above. The Microsoft Virtual Machine for Java is available with the Internet Explorer 3.01 which can be installed via the browser selection page in the ObjectAda for Windows installation wizard. There is an option to install the JavaSoft Java Development Kit at the end of the ObjectAda for Windows installation wizard.

Instructions for the game of Mancala

The red rectangle indicates whose turn it is. When it is your turn, you can click on any of your grey bins to sow the seeds of that bin, one at a time, in the bins that follow counterclockwise.

If the last stone sown lands in your "Mancala," which is the brown bin at the end of your row of bins, then you get to go again. If the last stone lands in an empty bin on your side, then you "capture" your stone and any of the stones in the immediately opposite bin -- all of the captured stones go into your Mancala. While sowing your stones, you skip over your opponent's Mancala, but you sow into your own Mancala like a regular bin.

The game is over as soon as anyone runs out of stones. At this point the other player captures all of the stones that remain on their side -- so it is not always wise to run out first! The goal of the game is of course to end up with as many stones as possible, though presumably the game could be played with the inverse goal of ending up with as few stones as possible.

At some point in the future, we will teach the computer how to play automatically. Right now, you have to play against yourself, or someone else out there sitting next to you.

Ada 95 and Java

This version of Mancala was written in Ada 95 by Tucker Taft and Rowan Maclaren. Tucker and Rowan work for Intermetrics, and are working with Vince Del Vecchio on their Ada 95 => Java byte code "AdaMagic(tm)" compiler.

Here is the source in Ada 95.

Note: This applet cannot be viewed with the "alpha" HotJava browser.