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:
<gameData>
<pit00>0000000000000001111</pit00> <pit01></pit01> <pit02></pit02> <pit03></pit03> <pit04>2</pit04> <pit05>3</pit05> <pit06>00</pit06> <pit10>0000000000000</pit10> <pit11>0</pit11> <pit12>222</pit12> <pit13></pit13> <pit14></pit14> <pit15></pit15> <pit16>0</pit16> </gameData> 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:
|
Game options | ||||||
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:
<gameOptions>
<hidden>0</hidden> <scored>1</scored> <stones>4</stones> <captureEmpty>1</captureEmpty> </gameOptions> |
Game specific error messages | ||||||||
|