Example #1
0
 public function process()
 {
     if (!$this->isLocked()) {
         $time = $this->dateTimeProvider->getDateTime()->format('U');
         $ids = $this->VDataModel->getAllIds();
         foreach ($ids as $id) {
             $village = $this->villageService->getVillage($id);
             $this->productionService->processProduction($village, $time);
         }
         $this->buildingService->processBuildings($time);
         $this->processTraining->process($time);
         $this->releaseLock();
     }
 }