CellDecorator(Cell cell) { this.decoratedCell = cell; this.setName(cell.getName()); this.setFoodEaten(cell.getFoodEaten()); this.setCellsSwallowed(cell.getCellsSwallowed()); this.setStrategy(cell.getStrategy()); this.setColor(cell.getColor()); this.setMass(cell.getMass()); this.setSpeed(cell.getSpeed()); this.setDirection(cell.getDirection()); this.setDrawLocation(cell.getDrawLocation()); this.setCenterLocation(cell.getCenterLocation()); }
@Override public void setCenterLocation(Vector centerLocation) { super.setCenterLocation(centerLocation); decoratedCell.setCenterLocation(centerLocation); }
@Override public void setDrawLocation(Vector drawLocation) { super.setDrawLocation(drawLocation); decoratedCell.setDrawLocation(drawLocation); }
@Override public void setDirection(Vector direction) { super.setDirection(direction); decoratedCell.setDirection(direction); }
@Override public void setFoodEaten(int foodEaten) { super.setFoodEaten(foodEaten); decoratedCell.setFoodEaten(foodEaten); }
@Override public void setCellsSwallowed(int cellsSwallowed) { super.setCellsSwallowed(cellsSwallowed); decoratedCell.setCellsSwallowed(cellsSwallowed); }
@Override public void setColor(Color color) { super.setColor(color); decoratedCell.setColor(color); }
@Override public void setMass(double mass) { super.setMass(mass); decoratedCell.setMass(mass); }
@Override public void setSpeed(double speed) { super.setSpeed(speed); decoratedCell.setSpeed(speed); }
@Override public void setStrategy(StepStrategy strategy) { super.setStrategy(strategy); decoratedCell.setStrategy(strategy); }
@Override public void removeMass(double toBeDeletedMass) { super.removeMass(toBeDeletedMass); decoratedCell.removeMass(toBeDeletedMass); }
@Override public void addMass(double additionalMass) { super.addMass(additionalMass); decoratedCell.addMass(additionalMass); }