igGameCenter API Developer Guide >> List of available games >> Renju
This page describes all specific details related to the Renju 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 black stones, which moves first.

The value of 2 corresponds to the white stones.


Move code format
When a player wants to place a stone in some cell an external application should send a coordinate of the cell as a move code.

I.e. A15 code has to be sent for the top left cell (look at the screenshot above).


Game board data format
Below is an example of how the board data is encoded in XML response coming from handler API script:

<gameData>
<board>00000000000000012....002210000000000</board>
</gameData>

The board tag contains a string of 225 digits representing the board cells row-by-row. I.e. the first digit represents the state of the A15 cell, the second digit represents the B1 cell, 15th digit - O15, 16th - A14 and so on till the 64th digit representing O1 cell.

Each digit in the mentioned above string can have the following values:
0 an empty cell
1 a black stone
2 a white stone


Game options
There is one additional option specific to the Renju game:

Field Name Field Content
renjuType This option defines the type of renju game:
free - there are no limitations for black stones. The first stone should be placed at the middle of the board, the second stone should be placed inside a red square and the third stone should be placed outside a red square.
classic - black cannot form overlines, double four and double three forks. The first stone should be placed at the middle of the board, the second stone should be placed near the first one and the third stone should be placed inside a red square.
classicopen - like classic but with the official opening sequence.

The default value is free.


This option can be included as additional parameter 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>
    <renjuType>free</stones>
</gameOptions>


Game specific error messages
Error code Error meaning
NOT_YOUR_TURN_NOW One tried to make a move when it wasn&39;t his turn.
INVALID_MOVE One tried to make an invalid move.
GAME7_NO_SKIP_BEFORE_6 A move cannot be skipped before placing 6 stones on the board.
GAME7_NO_SWAPS Player colors cannot be swapped at the current step of the game.
GAME7_REMOVE_5TH_STONE Player should remove one of the 5th stones at the current step of the game.
CELL_NOT_EMPTY One tried to place a stone to a non-empty cell.
GAME7_1ST_STONE_IN_MIDDLE 1st stone should be placed at the middle of the board.
GAME7_2ND_STONE_INSIDE_SQUARE 2nd stone should be placed inside a red square (for free renju).
GAME7_2ND_STONE_NEAR_1ST 2nd stone should be placed near the first one (for classic and classicopen renju).
GAME7_3RD_STONE_OUTSIDE_SQUARE 3rd stone should be placed outside a red square (for free renju).
GAME7_3RD_STONE_INSIDE_SQUARE 2nd stone should be placed inside a red square (for classic and classicopen renju).
GAME7_3X3_FORK_FORBIDDEN Double three forks are forbidden for blacks (for classic and classicopen renju).
GAME7_4X4_FORK_FORBIDDEN Double four forks are forbidden for blacks (for classic and classicopen renju).
GAME7_OVERLINE_FORBIDDEN Overlines are forbidden for blacks (for classic and classicopen renju).