Introduction

I first became interested in the game of Mancala when I was given an assignment to create a computer strategy for the game in University. It was a large project, with many groups working toward the same goal. In the end, there was to be a big tournament in which all the strategies competed against each other to see which was the best. This wasn't a test in programming (though it turned out to be) so much as a test in group work. All the strategies had to be able to communicate with one another, and all the modules within one strategy had to interface together in a certain was, designated by the league (there were three leagues). This was the only course in University where I actually applied programming knowledge!

The version of Mancala we were working on had some serious modifications, and was much more complex than the standard version. So much more complex, in fact, that when the tournament came around, the kernel written by fifth year students, had to be rewritten twice during the contest. When the kernel worked properly, not one team went through the entire tournament without making an illegal move. Teams that made illegal moves were removed from the contest, and there were no remaining teams after the contest was over. In my own defense, our strategy was not the most complicated, but was the most error-free. There was only one particular case where ours made an illegal move, and that is saying a lot because some teams never made it through a single game!

This is all leading up to my program that I have written for the Sharp Zaurus. Trolltech, the writers of the QT design tools for the Zaurus, started a contest to build developer support for the device. There are some fantastic prizes (which I am going to try to win ;-D ) for any program that is written using their development tools and runs on the Zaurus. I could not think of anything to write for my program, so I decided to go with something I kenw. The version I used is the standard version, so is a lot simpler. There are, however, many options the user can turn on that make the game far more challenging and fun. So, without any further pre-amble, I present Fiferboy's Mancala5000!

Screenshots


Mancala5000 is a game which is playable on the Sahrp Zaurus. The user interface is simple and easy to use, but provides a lot of information and options. I will describe each of the three screens you will see in the game.

Mancala

Mancala Main Screen

This screen is the screen where you actually make your moves. To do this, you select one of the yellow buttons that is not empty. Each button represents a pot, and the number on each button represents the pieces in the pot. The first play controls the top siz pots, with his/her store on the right of the scrren, and the second player controls the bottom six with a store on the left. The checkbox lets you know that, in this particular case, the pieces will be moving clockwise and you cannot change that. In the "Settings" screen you can change this. There is a message right underneath the game board letting the player know that they can only select yellow boxes. The "Turn Result" section of the screen displays the current information on the game. It displays whose turn it is, the result of the move (ie, normal move, free turn, etc.) and who is currently winning in that order. That's about it for this screen.

This screen contains all the options that the user can choose from. The first option is the Set Players. The user can either play against another person (2 players) or against the computer (1 player). Difficulty goes directly with the number of players, but it only matters if a one player game is selected. The difficulty set how hard the computer is to play against. As of right now, Average and Hard are pretty much the same level. Most of the time if average beats you hard will beat you by more, but if you can beat average you can beat hard. Easy is fairly easy to beat by just playing randomly. This is the main thing I need to change before submitting my final program. I am going to make hard much harder, and maybe add more levels in between. Direction controls whether the pieces move Clockwise or Anticlockwise (counter-clockwise). Selecting Either will let the user choose before each turn which direction they want to play. Anti-clockwise is the most challenging for me, becuase you are playing into your opponent's store, and "either" gives you the most control. The last option is the Number of Pieces per Pot. The standard is four, but you can select as few as three, and as many as eight (for now) to make the game different and more challenging. Any time you change a value in this menu the current game will be reset with the new values.

Mancala Settings Screen
Mancala Rules Screen

This screen describes the rules of Mancala. They were written by me, so they are not the "official Mancala ruleset" if such a thing exists. Here is what they say:

Rules for Mancala:
GENERAL
Mancala is an ancient board game played on a field of 14 pots. A pot is a container used to store game pieces. The board is set up so each of the two players has six pots on his/her side. The pot on the player's left hand side (when facing the game board) is the player's store. This special pot is where each player will try to get more pieces than his/her opponent to win the game.

MOVING
A turn is completed when a player has selected a pot. He/She then takes all of the pieces out of the pot and places them in consecutive pots going clockwise. No pots are skipped, and both stores are included.

Each turn will have one of the following results:

  1. Normal Move - The player selects a pot, moves, and the turn ends, and no further play is required. The next player takes his/her turn.
  2. Free turn - The player selects a pot and the last piece moved ends up in that player's store, the player earns a free move. More than ont free turn is possible in a row.
  3. Capture - The player selects a pot, moves, and the last piece ends up in a previously empty pot on the player's side of the board. This piece and the pieces in the opponents corresponding pot (the one directly across the board) are removed and put in the current player's store.

GAME OVER
The game ends when a player completes a move and has no pieces left on his/her side. It may happen that the other player has no pieces left as well, and in this case the pieces in the stores are counted, and the player with more is declared the winner. If the opponent does have pieces left, they are removed and placed in his/her store, then the stores are counted and the winner is declared. It is possible for the game to end in a tie.

AUTHOR
This version of Mancala was written by Andrew Olmsted. It was designed using Trolltech's QT SDK, and written in C++. Any questions can be directed to:
andrew.olmsted@sympatico.ca


Downloads


The program is available for downloading, but remember it is only a beta program. The formats to download are:
TRABALL - download here
IPACKAGE - download here