MMP Mancala

This is a game that I wrote for my elder daughter, Madeline Marie Parks (hence MMP). She wanted me to find a PC version of this African board game for her to play, but I couldn't find one that I liked. I happened to have plenty of time on my hands and I was implementing a C++ Win32 library that needed another sample application, so I decided to write my own version of the game.

So far it's turned out fairly well, considering that the last game I wrote was about 17 years ago, and that was a lame little typing game on a TI-99/4A. I'm having a lot of fun with it, and learning a thing or two along the way. Feel free to download this game and pass it along to your friends as well. If you have any ideas, complaints, or comments please send me an e-mail and let me know.

Download the Latest Version

Installing Mancala

You may download the install file here. Save this file to a folder on your computer, preferably someplace familiar. Once the file has downloaded, open the folder where you saved the file and double-click that file to install MMP Mancala.

Recent Updates

I haven't made any modifications to the game, but since I have recently updated WindowLib considerably, I wanted to go ahead and post the updated Mancala executable and source.

Upcoming Versions

I did, at one time, have plans for versions 2 and 3 of this game. Now, I'm down to just a version 2. I want to write the next version for the .NET platform in C#. I'm not quite sure when I'll get around to this, but I will. I'm planning to add support for online play, a web service to distribute new game variations, and a published set of interfaces for developing game variations.

Source Code

The source code for Mancala is finally available here. Once you've downloaded Mancala.zip you can unzip it to a folder on your computer. The latest source is designed to work with an updated version of my C++ Win32 library. The new library has a lot of bug fixes and much fewer stupid things wrong with it.

MMP Mancala is an open-source project, licensed under a BSD-style license. The full text of the license is provided here.

How to Play

Basic Concepts

The board comprises 12 small cups, six on each side, with two large cups on either end. (Click here for a screen shot of the game board.) Player 1's cups are along the bottom, and Player 2's are along the top. The large cup, or kahala, on the right is Player 1's home cup, and the kahala on the left is Player 2's home cup.

In my program, Player 1 always makes the first move. Player 1 selects a cup on his side of the board and picks up all the stones from the cup. The player then moves to each cup in a counter-clockwise direction and drops one stone into each cup until all the stones have been dropped. Depending on the variation being played, this may mean the end of a turn or play may continue, but this is how play always begins.

During each move, a player drops one stone into his home cup as he passes it, but not into the opponent's home cup. If the last stone dropped lands in a player's kahala, the player may choose another cup on his side and continue the turn.

Players then alternate turns until a player has no stones remaining to pick up on his side of the board. That player then counts the stones in his home cup, while his opponent moves any stones remaining on his side into his home cup and counts those stones. Whoever has the highest number of stones in his home cup wins.

There are several variations of the game, but the basic strategy for each variation is to move so that the most stones end up in the home cup without dropping stones onto the opponent's side that may eventually count toward his score.

The Computer Game

When the program opens, it presents a New Game dialog (see picture) where the type of rules, players, and number of stones may be selected. Select the desired options and press OK to begin the game.

When it's Player 1's turn, the cups on Player 1's side will be outlined in white ovals; the same is true for Player 2. Select a cup to begin the turn by clicking on an outlined cup. The cursor will turn into a pointing hand when hovering over a clickable cup.

When the game ends, a window will appear showing how many stones each player collected and which player won. To start a new game, click the "Yes" button, or click "No" to make the window go away.

Rules Variations

I've implemented five variations of the game so far, and I'll add more as I get around to them.

MMP Rules

This is the default in the New Game dialog. This is the way that my daughter learned to play the game at summer camp last year. I haven't been able to find this variation mentioned anywhere else, so I named it after Madeline.

Play begins as described in Basic Concepts. If a player drops the last stone on that player's side of the board, and the cup in which the stone is dropped is not empty, the player picks up the stones in that cup and continues the turn. The turn ends when the last stone is dropped on the opponent's side of the board or in an empty cup on the current player's side.

Traditional Rules

This is how I usually have seen the game described. Play proceeds as described in Basic Concepts. Each player's turn ends after all stones picked up have been dropped, regardless of where they land.

Capture To Home

This variation is very similar to Capture Opposite, except that stones captured from the opponent are moved to the home cup rather than the opposite cup. I've had the best luck winning this game... but that's just because I haven't updated the computer engine to be smarter on this variation.

Capture Opposite

This variation plays just like the Traditional Rules, except when the last stone dropped lands in an empty cup on the current player's side of the board. When that happens, any stones in the cup directly across the board on the opponent's side are moved onto the cup on the player's side.

Trysse

Play begins when a player clicks a valid cup. Stones are removed from that cup and seeded counter-clockwise. Stone are not dropped into the home cups. If the last stone dropped lands on the current player's side of the board and the dropped stone makes the total in that cup two or three stones, the stones are "captured" and moved to the player's home cup. If there are no stones on a player's side, the other player must choose a cup, if any, that will move stones to that side of the board. If no such move is possible, the player with stones remaining adds those stones to his captured total. The game ends when either player has captured 21 stones, becoming the winner.