mancala: Ten days of games

Oddly enough, I have a small stack of working games piled up, and I’m thinking it has been more than a year since I stuck with just games as a theme. So I figure between now and the end of the month, barring incident, I can hold out about 20 for review.

Let’s keep things simple at the start though; here’s mancala, from the author of banner, which you might remember from a month ago.

2014-10-15-6m47421-mancala

If you don’t know the actual game Mancala, or perhaps one of its derivatives, the game might not make much sense at first.

Given the fact that there are hundreds of versions that span entire cultures and eras, it might be an oversimplification to say that the goal is to empty your side of the board by counting out all the beads in a pot in counterclockwise fashion. When a side is empty the game stops, and the winner has the most beads in their right-hand reservoir. Those are the rules I know, anyway. 😐

But I’ve done a terrible job of explaining it, and it’s likely you’ll need to reconcile the rules you know against the way mancala (the program) plays. Don’t be surprised if your local rules differ from this application.

Short of animation, mancala updates its board in a scrolling fashion, and does all the counting for you. You can adjust the number of starting beads and a few other basic rules at the command line; entering 0 for the top or bottom designates a human player. To quit early, press CTRL+D.

The computer is quite good, which I expect with a game that stresses simple math as its core strategy. Don’t be surprised if the computer takes off to a commanding lead early in the game.

The source code offers an X-based version but I didn’t bother picking out the dependencies, so you’ll have to sort that out on your own. As it is, mancala is a faithful rendition of one version of the Mancala game, and does a good job of keeping you challenged at the same time.