move

fun move(index: Int): Boolean

Places an X or an O on the specified index depending on whose turn it is.

Return

true if the move has not already been played

Parameters

index

the position on the board (example: index 4 is location (0, 1))


fun move(x: Int, y: Int): Boolean

Places an X or an O on the specified location depending on who turn it is.

Return

true if the move has not already been played

Parameters

x

the x coordinate of the location

y

the y coordinate of the location