Free Software by Sam Clippinger -- JSmancala

Author: Sam Clippinger <samc (at) silence (dot) org>
Copyright: ©2004 Sam Clippinger
License: GNU GPL
Current version: 1.1.0 Archived versions: All versions Documentation: Change Log
Dependencies: A working Javascript and CSS browser. Tested successfully in Mozilla 1.5 and IE 6.0. A fast computer is very important.

Source language: HTML 4.0, Javascript 1.2
Target platform: Web browsers with working Javascript and CSS support.
Description: JSmancala is a Javascript/DHTML implementation of the board game "Mancala". Traditionally, Mancala is played with small stones on a wooden board with little cups scooped out.

Mancala is very easy to play. It is a two player game. The object is to collect as many of the stones as possible.

Each player controls one side of the board. On a traditional (real) board, the player controls the side closest to him. Each side of the board has six "cups" and one "jar". The "cups" are spaces along the length of the board and the "jar" is a larger space at the end of the board. When the game begins, each "cup" contains 4 stones and each "jar" is empty.

Play begins when one player selects a "cup" on his side of the board and removes all of the stones from it. The stones are then redistributed in the other "cups" on the player's side, one stone at a time, moving toward the right. If any stones remain after the last "cup" has had a stone added to it, one stone is placed in the player's "jar" and the redistribution continues on the opponent's side of the board. Redistribution continues in a counterclockwise manner until all the stones have been placed. No stones are ever placed in the opponent's jar when the player is making his move.

Once a stone is placed in a player's "jar", it cannot be removed.

There are two twists. First, if the last stone being redistributed lands in the player's "jar", the player gains an extra turn.

Second, if the last stone being redistributed lands in an empty "cup" on the player's side of the board and the "cup" on the opposite side of the board is not empty, the stones in both "cups" are "captured". Captured stones are immediately removed from both "cups" and placed in the player's "jar".

Play ends when there are no stones in any "cup" on one of the sides of the board, regardless of whose turn it is.

A player's score is determined by totalling all of the stones in his "cups" and his "jar". The player with the highest score wins.

This version allows the user to play the computer, another human or watch the computer play itself. The computer players have five levels of "intelligence", rated from "foolish" to "wise". An "advice" button is also provided that the player may click at any time during his turn. It will use the "computer intelligence level" set for the player to calculate the best move. That move will be highlighted on the board.

Click here to run the latest version of JSmancala.