Example #1
0
 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());
 }
Example #2
0
 @Override
 public void setCenterLocation(Vector centerLocation) {
   super.setCenterLocation(centerLocation);
   decoratedCell.setCenterLocation(centerLocation);
 }
Example #3
0
 @Override
 public void setDrawLocation(Vector drawLocation) {
   super.setDrawLocation(drawLocation);
   decoratedCell.setDrawLocation(drawLocation);
 }
Example #4
0
 @Override
 public void setDirection(Vector direction) {
   super.setDirection(direction);
   decoratedCell.setDirection(direction);
 }
Example #5
0
 @Override
 public void setFoodEaten(int foodEaten) {
   super.setFoodEaten(foodEaten);
   decoratedCell.setFoodEaten(foodEaten);
 }
Example #6
0
 @Override
 public void setCellsSwallowed(int cellsSwallowed) {
   super.setCellsSwallowed(cellsSwallowed);
   decoratedCell.setCellsSwallowed(cellsSwallowed);
 }
Example #7
0
 @Override
 public void setColor(Color color) {
   super.setColor(color);
   decoratedCell.setColor(color);
 }
Example #8
0
 @Override
 public void setMass(double mass) {
   super.setMass(mass);
   decoratedCell.setMass(mass);
 }
Example #9
0
 @Override
 public void setSpeed(double speed) {
   super.setSpeed(speed);
   decoratedCell.setSpeed(speed);
 }
Example #10
0
 @Override
 public void setStrategy(StepStrategy strategy) {
   super.setStrategy(strategy);
   decoratedCell.setStrategy(strategy);
 }
Example #11
0
 @Override
 public void removeMass(double toBeDeletedMass) {
   super.removeMass(toBeDeletedMass);
   decoratedCell.removeMass(toBeDeletedMass);
 }
Example #12
0
 @Override
 public void addMass(double additionalMass) {
   super.addMass(additionalMass);
   decoratedCell.addMass(additionalMass);
 }