public static void CheckIfPawnReachedEnd(IBoard board, IFigure figure, Position to, IInputProvider input) { if (figure.Color == ChessColor.White && to.Row == 8) { int chosenNumber = input.GetPawnPromotion(); ChosenFigure(board, to, chosenNumber, figure.Color); } else if (figure.Color == ChessColor.Black && to.Row == 1) { int chosenNumber = input.GetPawnPromotion(); ChosenFigure(board, to, chosenNumber, figure.Color); } }