Developing your own bot

Technically, you have to develop a Webservice that implements the following methods:

                
/**
 * Method called before a game has started
 *
 * @return int Game Id
 */
public function startGame();

/**
 * Method called before a set has started
 *
 * @return void
 */
public function startSet();

/**
 * Method called after a set is finished
 *
 * @return void
 */
public function finishSet();

/**
 * Method called after a game is finished
 *
 * @return void
 */
public function finishGame();

/**
 * Returns the board in string mode
 *
 * Board is returned in string mode
 * as a 100 characters length where:
 * 0: Water
 * 1: 
 * 2:
 * 3:
 * 4:
 * 5:
 *
 * @param string $pIdGame
 * @return string 100 characters length string representing a board
 */
public function getBoard($pIdGame);

/**
 * Returns an array with 2 positions (x,y) representing a shot agains the opponent
 *
 * @param string $pIdGame
 * @return array Array with 2 positions (x,y) where 0 <= x < 10 and 0 <= y < 10
 */
public function sendShot($pIdGame);

/**
 * Returns an array with 2 positions (x,y) representing a shot agains the opponent
 *
 * @param string $pIdGame
 * @return array Array with 2 positions (x,y) where 0 <= x < 10 and 0 <= y < 10
 */
public function receiveShot($pIdGame, $pX, $pY);

/**
 * Returns the result of the last shot (sendShot)
 *
 * @param string $pIdGame
 * @return int 0: Water, 1: Touched, 2: Sunk
 */
public function getResultLastShot();

/**
 * Called when the game is over (cleaning purpouses)
 *
 * @param string $pIdGame
 * @return void
 */
public function finishGame($pIdGame);

                
                

Aha! so you want to be daddy of all that bunch of "developers", but you don't know where to start, easy! You can find here some examples of bots, but take care, because they don't play very well.

Testing your own bot

If you need a sparring to train against you can use our dummy player. It's a bit silly so, please, don't be so hard. You will need a SOAP client that connects against the following WSDL contract and you will be able to fight against him.