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