toCoordinate

Converts a linear index to a Coordinate on the board.

Throws

if the index is out of bounds.