Exemple #1
0
 protected function getParticipantKFactor(ParticipantInterface $participant)
 {
     $rating = $participant->getRating();
     if ($participant->getTotalGames() < 30 && $rating < 2300) {
         return 40;
     } elseif ($rating >= 2400) {
         return 10;
     } else {
         return 20;
     }
 }
Exemple #2
0
 protected function getParticipantKFactor(ParticipantInterface $participant)
 {
     $rating = $participant->getRating();
     if ($rating > 2400) {
         return 16;
     } elseif ($rating >= 2100) {
         return 24;
     } else {
         return 32;
     }
 }
 public function getWinProbability(ParticipantInterface $participantA, ParticipantInterface $participantB)
 {
     $probabilityA = $this->getIndividualProbability($participantB->getRating(), $participantA->getRating());
     $probabilityB = 1 - $probabilityA;
     return [$probabilityA, $probabilityB];
 }