suggestMove method

LudoLegalMove? suggestMove()

The move the hard bot would play now, for showing a hint to a human. null unless a piece selection is pending.

Implementation

LudoLegalMove? suggestMove() {
  if (_state.phase != LudoTurnPhase.awaitingPieceSelection ||
      _state.legalMoves.isEmpty) {
    return null;
  }
  return const LudoHardBot().chooseMove(_state);
}