type = $type; $trees = new Tree($type === self::TYPE_BIRCH ? WoodType::BIRCH : WoodType::OAK); $trees->setBaseAmount(5); $this->addPopulator($trees); $tallGrass = new TallGrass(); $tallGrass->setBaseAmount(3); $this->addPopulator($tallGrass); $this->setElevation(63, 81); if($type === self::TYPE_BIRCH){ $this->temperature = 0.6; $this->rainfall = 0.5; }else{ $this->temperature = 0.7; $this->rainfall = 0.8; } } public function getName() : string{ return $this->type === self::TYPE_BIRCH ? "Birch Forest" : "Forest"; } }