Tutorial
Installation (with Eclipse)

create a new project in the workspace (File > New ..> new java-project)
right click on the project >Properties > Libraries > Add external Jar > search and choose the ChessBall.jar

Create a bot:

Right click on src > new Class > name the class > press enter
In class:
the class have to extends from AI
Go with the mouse over AI > import AI
Go with the mouse over the class name > add Methods
To start: right click on the project > Run As > Java Application > choose ChessBall

Help

The playground is a 2 dimensional array
To get the figure on position x = 4 and y = 7,
you have to call: level[y][x]
At first the y-value and the second dimension the x-value


Look in the class ChessBallConstants, here you can find all constants for the figures.

Methods, you have to override:
String getName() - returns the name of your AI
ArrayList<ChessBallAIMove> think(final int[][] level, final AtMove eAtMove) - main method

You will get the level as a 2 dimensional array
eAtMove.isWhite() means you are the white player and it is your turn
eAtMove.isBlack() means you are the black player and it is your turn
the method returns an ArrayList with ChessBallAIMove-Objects

Examplecode:

ArrayList<ChessBallAIMove> think(final int[][] level, final AtMove eAtMove) {
	ArrayList<ChessBallAIMove> result = new ArrayList<ChessBallAIMove>();
	//if a queen is on position x = 4 and y = 5 and wants to move to x = 3 and y = 6
	result.add(new ChessBallAIMove(ChessBallConstants.FIELD_QUEEN_WHITE, 4, 5, 3, 6));
	//and after that the ball should be played
	result.add(new ChessBallAIMove(ChessBallConstants.FIELD_BALL, 4, 7, 5, 8));

	return result;
}

To find out where a figure can move call the method:

boolean[][] canGoArea(final int[][] level, final int x, final int y, final AtMove eAtMove)
// at first the level, after that the x and y value of the figure, 
// the last parameter shows which player is moving
// return an 2 dimensional boolean array. In the next pic you can see, 
// where the yellow circles are the value is true, otherwise false

To find out, if your own figure is safed by another figure from you, you can call

int[][] getSafeArray(final int[][] level, final AtMove eAtMove)

If you want to inform the player what the ai is doing override the method:

String getStatus()
// if the result is not null, the text is shown while thinking