예제 #1
0
 /**
  * Calculates new rankings and returns in RatingsOutput
  * @return RatingsOutput represents new rankings
  */
 public function calculate()
 {
     if ($this->ratingsInput->isNeutralVenue()) {
         $calculate = new CalculateNeutralVenue($this->ratingsInput);
         return $calculate->getOutput();
     }
     $calculate = new Calculate($this->ratingsInput);
     return $calculate->getOutput();
 }
예제 #2
0
 /**
  * Creates new Exchange instance for calculating Exchange amount; passing
  * in any relevant weightings.
  */
 protected function setExchange()
 {
     // create weightings
     $weightings = array();
     $weightings[] = new WeightingHighScore($this->ratingsInput->getTeamAScore(), $this->ratingsInput->getTeamBScore());
     if ($this->ratingsInput->isRugbyWorldCup()) {
         // RWC game
         $weightings[] = new WeightingWorldCup();
     }
     $this->exchange = new Exchange($this->ratingsGap, $this->matchResult, $weightings);
 }