private bool ErrorPosition(string position, IBoardManager boardManager) { if (!boardManager.GetPosition(position).GetFigure()) { Errors.Push($"Вы выбрали пустую клетку"); return(true); } return(false); }
public ErrorInputTextСhecking(string inputText, ref IBoardManager boardManager) { Errors = new Stack <string>(); if (inputText.Equals("")) { Errors.Push("Впишите команду"); return; } string[] positions = inputText.Split(':'); ErrorCountPosition(inputText); if (ErrorСheckingPositions(positions)) { return; } if (ErrorPosition(positions[0], boardManager)) { return; } ErrorMove(boardManager.GetPosition(inputText.Split(':')[0]), boardManager.GetPosition(inputText.Split(':')[1])); }