public void AddFigure(IFigure figure, Position position) { ObjectValidator.CheckIfObjectIsValid(figure, NullFigureMessage); ObjectValidator.CheckIfPositionIsValid(position, InvalidPositionMessage); int arrRow = position.Row; int arrCol = position.Col; this.chessboard[arrRow, arrCol] = figure; }
public void RemoveFigure(IFigure figure) { ObjectValidator.CheckIfObjectIsValid(figure, NullFigureMessage); this.CheckIfFigureDoesntExists(figure); this.figures.Remove(figure); }
public void AddFigure(IFigure figure) { ObjectValidator.CheckIfObjectIsValid(figure, NullFigureMessage); this.CheckIfFigureExists(figure); this.figures.Add(figure); }