// Get new instance
$taskInstance = new CityDaemonBuildingGrowthTask();
+ // Get city daemon instance
+ $cityInstance = CityDaemonFactory::createCityDaemonInstance();
+
+ // Set it here for "caching" it
+ $taskInstance->setCityInstance($cityInstance);
+
// Return the prepared instance
return $taskInstance;
}
* @todo 0% done
*/
public function executeTask () {
- $this->partialStub('Unimplemented task.');
+ // Get daemon instance
+ $cityInstance = $this->getCityInstance();
+
+ // Is there at least one building to expand?
+ if ($cityInstance->isBuildingPendingExpansion()) {
+ // Expand the building
+ $cityInstance->expandBuildings();
+ } // END - if
}
/**
// Get new instance
$taskInstance = new CityDaemonHouseholdGrowthTask();
+ // Get city daemon instance
+ $cityInstance = CityDaemonFactory::createCityDaemonInstance();
+
+ // Set it here for "caching" it
+ $taskInstance->setCityInstance($cityInstance);
+
// Return the prepared instance
return $taskInstance;
}
* @todo 0% done
*/
public function executeTask () {
- $this->partialStub('Unimplemented task.');
+ // Get daemon instance
+ $cityInstance = $this->getCityInstance();
+
+ // Is there at least one house hold to expand?
+ if ($cityInstance->isHouseholdPendingExpansion()) {
+ // Expand the house hold
+ $cityInstance->expandHouseholds();
+ } // END - if
}
/**