public void RemovePiece(IPiece piece) { ObjectValidator.CheckIfObjectIsNull(piece, ErrorMessages.NullPieceError); //TODO: check piece and color ChefIfPieceDoesNotExist(piece); pieces.Remove(piece); }
public void RemoveFigure(IFigure figure) { ObjectValidator.CheckIfObjectIsNull(figure, GlobalErrorMessages.NullFigureErrorMessage); this.CheckIfFigureDoesNotExist(figure); this.figures.Remove(figure); }
public void AddPiece(IPiece piece) { ObjectValidator.CheckIfObjectIsNull(piece, ErrorMessages.NullPieceError); ChefIfPieceExists(piece); this.pieces.Add(piece); //TODO: check piece and color }
public void AddFigure(IFigure figure) { ObjectValidator.CheckIfObjectIsNull(figure, GlobalErrorMessages.NullFigureErrorMessage); // TODO: check figure and player color this.CheckIfFigureExists(figure); this.figures.Add(figure); }
public void AddFigure(IFigure figure) { ObjectValidator.CheckIfObjectIsNull(figure, GlobalErrorMessages.NullFigure); CheckIfFigureExist(figure); this.figures.Add(figure); }
public void RemoveFigure(IFigure figure) { ObjectValidator.CheckIfObjectIsNull(figure, GlobalErrorMessages.nullFigureErrorMessage); //TODO check the color of the player this.CheckIfFigureDoesNotExists(figure); this.figures.Remove(figure); }
public void RemoveFigure(IFigure figure) { ObjectValidator.CheckIfObjectIsNull(figure, GlobalErrorMessages.NullFigureErrorMessage); //TODO: check figure and player color. this.CheckIfFigureDoesNotExit(figure); this.figures.Remove(figure); }
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; }
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; }
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; }
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; }
public void RemoveFigure(IFigure figure) { ObjectValidator.CheckIfObjectIsNull(figure, ExceptionMessages.NullFigureException); this.CheckIfFigureDoesNotExists(figure); this.figures.Remove(figure); }
public void AddFigure(IFigure figure) { ObjectValidator.CheckIfObjectIsNull(figure, ExceptionMessages.NullFigureException); CheckIfFigureExists(figure); this.figures.Add(figure); }
public void AddFigure(IFigure figure, Position position) { ObjectValidator.CheckIfObjectIsNull(figure, GlobalErrorMessages.NullFigureErrorMessages); CheckIfPositionIsValid(position); }