undoMove method Null safety

void undoMove()

undo a logical move and updates the board

Implementation

void undoMove() {
  final move = _logic.undoMove();

  /// update history move
  _moveHistoryNotifier.removeMoveNode();
  _moveHistoryNotifier.goBackward();

  /// update board
  if (move != null) _updateBoardAfterMove(move);
}