Skip to content
Niklas Lindblad edited this page Oct 20, 2015 · 5 revisions

ai.owner

value representing the player id.

ai.opponent

value representing the opponent’s id.

ai.currentBoard

a table representing the current board state.

ai.currentBoard.getTileState

usage: ai.currentBoard.getTileState(x, y)

Get the id of the player owning the tile placed at the given x and y position.

ai.currentBoart.size

Value representing the size of the board where size = width = height.

ai.currentBoard.placePawnOnTile

usage: ai.currentBoard.placePawnOnTile(owner, x, y)

places a pawn on the specified position, this counts as a move and the rules will be controlled internally. Will return false if the move was illegal, no pawn will be placed in that case.

ai.currentBoard.isValidPlacementLocation

usage ai.currentBoard.placePawnOnTile(owner, x, y)

Checks if placing a pawn on a specific position would be a legal move.

Clone this wiki locally