selectPiece method

Future<void> selectPiece(
  1. int pieceId
)

Moves pieceId using the current roll, animating it one cell at a time. Completes once the move is committed.

Throws a StateError if it is a bot's turn or no roll is pending, and an ArgumentError if pieceId is not a legal move. Calls made while another move is animating are ignored.

Implementation

Future<void> selectPiece(int pieceId) async {
  _checkHumanTurn('selectPiece');
  await _select(pieceId);
}