Ejemplo n.º 1
0
 function compareTeams($a, $b)
 {
     $ret = $this->compareTeamsTieBreakers($a, $b);
     if ($ret == 0) {
         $ret = parent::compareTeams($a, $b);
     }
     return $ret;
 }
Ejemplo n.º 2
0
 /**
  * Sort a competition division by ratings (lower total is better), then base stuff.
  * We don't use compareTeamsTieBreakers here, because it looks at things like wins,
  * which are meaningless here.
  */
 function compareTeams($a, $b)
 {
     if ($a['rating'] > $b['rating']) {
         return 1;
     }
     if ($a['rating'] < $b['rating']) {
         return -1;
     }
     return parent::compareTeams($a, $b);
 }
Ejemplo n.º 3
0
 /**
  * Sort a ladder division by rating first, then all the usual stuff.
  */
 function compareTeams($a, $b)
 {
     if ($a['rating'] < $b['rating']) {
         return 1;
     }
     if ($a['rating'] > $b['rating']) {
         return -1;
     }
     $ret = $this->compareTeamsTieBreakers($a, $b);
     if ($ret == 0) {
         $ret = parent::compareTeams($a, $b);
     }
     return $ret;
 }
Ejemplo n.º 4
0
 function removeGameslot($slot_id)
 {
     parent::removeGameslot($slot_id);
     foreach ($this->slots as $key => $slot) {
         if ($slot['GameSlot']['id'] == $slot_id) {
             unset($this->slots[$key]);
             return;
         }
     }
 }