Esempio n. 1
0
 /**
  * Based on overall Assist + Goal conversion check out if team scored
  *
  * @return bool
  */
 private function didScore()
 {
     $overallConversion = $this->attackTeam->getOverallSuccessConversion();
     $random = \Offside\Random::generateRandomWithPotential($overallConversion, 100);
     if ($overallConversion == $random) {
         return true;
     } else {
         return false;
     }
 }
 public function getNumberOfActions()
 {
     $numberOfActionsDevider = Random::generateRandomWithPotential(8, 10) == 8 ? 10 : 7;
     return round(($this->getOverallStamina() + $this->getOverallCreativity()) / $numberOfActionsDevider, 0, PHP_ROUND_HALF_UP);
 }