Пример #1
0
 public void RemovePiece(IPiece piece)
 {
     ObjectValidator.CheckIfObjectIsNull(piece, ErrorMessages.NullPieceError);
     //TODO: check piece and color
     ChefIfPieceDoesNotExist(piece);
     pieces.Remove(piece);
 }
Пример #2
0
        public void RemoveFigure(IFigure figure)
        {
            ObjectValidator.CheckIfObjectIsNull(figure, GlobalErrorMessages.NullFigureErrorMessage);

            this.CheckIfFigureDoesNotExist(figure);
            this.figures.Remove(figure);
        }
Пример #3
0
 public void AddPiece(IPiece piece)
 {
     ObjectValidator.CheckIfObjectIsNull(piece, ErrorMessages.NullPieceError);
     ChefIfPieceExists(piece);
     this.pieces.Add(piece);
     //TODO: check piece and color
 }
Пример #4
0
 public void AddFigure(IFigure figure)
 {
     ObjectValidator.CheckIfObjectIsNull(figure, GlobalErrorMessages.NullFigureErrorMessage);
     // TODO: check figure and player color
     this.CheckIfFigureExists(figure);
     this.figures.Add(figure);
 }
Пример #5
0
        public void AddFigure(IFigure figure)
        {
            ObjectValidator.CheckIfObjectIsNull(figure, GlobalErrorMessages.NullFigure);
            CheckIfFigureExist(figure);

            this.figures.Add(figure);
        }
Пример #6
0
 public void RemoveFigure(IFigure figure)
 {
     ObjectValidator.CheckIfObjectIsNull(figure, GlobalErrorMessages.nullFigureErrorMessage);
     //TODO check the color of the player
     this.CheckIfFigureDoesNotExists(figure);
     this.figures.Remove(figure);
 }
Пример #7
0
 public void RemoveFigure(IFigure figure)
 {
     ObjectValidator.CheckIfObjectIsNull(figure, GlobalErrorMessages.NullFigureErrorMessage);
     //TODO: check figure and player color.
     this.CheckIfFigureDoesNotExit(figure);
     this.figures.Remove(figure);
 }
Пример #8
0
        public void AddFigure(IFigure figure, Position position)
        {
            ObjectValidator.CheckIfObjectIsNull(figure, GlobalErrorMessages.nullFigureErrorMessage);
            Position.CheckIsValid(position);
            int arrRow = this.GetArrayRow(position.Row);
            int arrCol = this.GetArrayCol(position.Col);

            this.board[arrRow, arrCol] = figure;
        }
Пример #9
0
        public void AddFigure(IFigure figure, Position position)
        {
            ObjectValidator.CheckIfObjectIsNull(figure, "Figure cannot be null!");
            Position.CheckIfValid(position);

            int arrRow = GetArrayRow(position.Row);
            int arrCol = GetArrayCol(position.Col);

            this.board[arrRow, arrCol] = figure;
        }
Пример #10
0
        public void AddPiece(IPiece piece, Position position)
        {
            ObjectValidator.CheckIfObjectIsNull(piece, ErrorMessages.NullPieceError);
            this.CheckIfPositionIsValid(position);

            int arrayRow = this.GetArrayRow(position.Row);
            int arrayCol = this.GetArrayCol(position.Col);

            this.board[arrayRow, arrayCol] = piece;
        }
Пример #11
0
        public void AddFigure(IFigure figure, Position position)
        {
            ObjectValidator.CheckIfObjectIsNull(figure, ErrorMessages.NullFigureErrorMessage);
            Position.ValidatePositionWithException(position);

            var arrayRow = this.GetArrayRow(position.Row);
            var arrayCol = this.GetArrayCol(position.Col);

            this._board[arrayRow, arrayCol] = figure;
        }
Пример #12
0
 public void RemoveFigure(IFigure figure)
 {
     ObjectValidator.CheckIfObjectIsNull(figure, ExceptionMessages.NullFigureException);
     this.CheckIfFigureDoesNotExists(figure);
     this.figures.Remove(figure);
 }
Пример #13
0
 public void AddFigure(IFigure figure)
 {
     ObjectValidator.CheckIfObjectIsNull(figure, ExceptionMessages.NullFigureException);
     CheckIfFigureExists(figure);
     this.figures.Add(figure);
 }
Пример #14
0
 public void AddFigure(IFigure figure, Position position)
 {
     ObjectValidator.CheckIfObjectIsNull(figure, GlobalErrorMessages.NullFigureErrorMessages);
     CheckIfPositionIsValid(position);
 }