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