private function executeProduction(ModelProductionMove $move) { $id_user = $move->getIdUser(); $id_zarea = $move->getIdZArea(); foreach ($move->getUnits() as $id_unit => $count) { $inGameLandUnits = ModelInGameLandUnit::getModelByIdZAreaUserUnit($this->id_game, $id_zarea, $id_user, $id_unit); $inGameLandUnits->addCount($count); } if (!isset($this->spent_production[$id_user])) { $this->spent_production[$id_user] = 0; } $this->spent_production[$id_user] += $move->getCost(); }