get

operator fun get(idx: Int): PieceType?

Gets the piece at the specified index like a linear list.

Return

The piece type at the specified index, or null if there is no piece.

Parameters

idx

The linear index of the piece to retrieve.

Throws

if the index is out of bounds.


operator fun get(coordinate: Coordinate): PieceType?

Gets the piece at the specified row and column.

Return

The piece at the specified position, or null if there is no piece.

Throws

if the row or column are out of bounds.