getMove method
Generates legal moves and returns the one that matches algebraic
.
Returns null if no move is found.
Implementation
Move? getMove(String algebraic) {
List<Move> moves = generateLegalMoves();
Move? match = moves.firstWhereOrNull(
(m) => toAlgebraic(m) == algebraic,
);
return match;
}