|igGameCenter API Developer Guide >> List of available games >> Kalah|
This page describes all specific details related to the Kalah game.
All information below is connected to the following board:
|Place value meaning|
The value of 1 contained in place parameter
in all XML responses corresponds to the bottom line of pits on the board and the right kalah.
The value of 2 corresponds to the top line of pits on the board and the left kalah.
Keep in mind that this is just an internal representation used in the igGameCenter but your application can use other forms of visual interface.
|Move code format|
|The format of the move codes that should be sent from an external application is very simple. When a player wants to sow seeds from some pit the application should send a numeric index of the source pit. 1 should be sent if the source pit is "a" or "A", 2 - if the source pit is "b" or "B" and so on.|
|Game board data format|
Below is an example of how the board data is encoded in XML response coming from
handler API script:
Each pitXY tag contains a string of digits representing a group of stones currently or previously present in a corresponding pit.
X can equal 0 (for the bottom line of pits and the right kalah) or 1 (for the top line of pits and the left kalah).
Y can equal 0 (for the kalah) or 1 to 6 (for the corresponding pits).
For example, pit04 represents a group of stones in a pit marked with "d" letter, pit12 stands for "B" and pit00 stands for "o" (right kalah).
Each digit in the mentioned above strings can have the following values:
There are two additional options specific to the Kalah game:
These options can be included as additional parameters when sending a POST request to the handler API script with the SETUP command.
The gameOptions part of the response received from the handler will be of the following form:
|Game specific error messages|