Пример #1
0
 public function updateScore()
 {
     $villages = $this->getVillages(false);
     $sum = 0;
     foreach ($villages as $v) {
         $sum += $v->getNetworth();
     }
     $this->setScore($sum);
     parent::updateScore();
 }