示例#1
0
        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;
        }
示例#2
0
 public void RemoveFigure(IFigure figure)
 {
     ObjectValidator.CheckIfObjectIsValid(figure, NullFigureMessage);
     this.CheckIfFigureDoesntExists(figure);
     this.figures.Remove(figure);
 }
示例#3
0
 public void AddFigure(IFigure figure)
 {
     ObjectValidator.CheckIfObjectIsValid(figure, NullFigureMessage);
     this.CheckIfFigureExists(figure);
     this.figures.Add(figure);
 }