mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-11-22 06:26:57 +01:00
fixed buchholz cut
This commit is contained in:
parent
5d4f4791cf
commit
9e4e2073c8
@ -231,7 +231,7 @@ class Pairtwo6 extends Pairtwo6Model implements ReaderInterface
|
|||||||
$tiebreak = Tiebreak::BuchholzMed;
|
$tiebreak = Tiebreak::BuchholzMed;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$tiebreak = Tiebreak::BuchholzMed;
|
$tiebreak = Tiebreak::BuchholzCut;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
$tiebreak = Tiebreak::Sonneborn;
|
$tiebreak = Tiebreak::Sonneborn;
|
||||||
|
@ -205,14 +205,14 @@ abstract class Tiebreaks extends Tournament
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($b->getOpponent()->getElo('Nation') == $a->getOpponent()->getElo('Nation')) {
|
if ($b->getOpponent()->getPoints() == $a->getOpponent()->getPoints()) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return ($b->getOpponent()->getElo('Nation') > $a->getOpponent()->getElo('Nation')) ? 1 : -1;
|
return ($a->getOpponent()->getPoints() > $b->getOpponent()->getPoints()) ? 1 : -1;
|
||||||
});
|
});
|
||||||
|
|
||||||
array_slice($intpairings, $cutlowest);
|
$intpairings = array_slice($intpairings, $cutlowest);
|
||||||
array_slice($intpairings, 0 - $cuthighest);
|
$intpairings = array_slice($intpairings, 0 - $cuthighest);
|
||||||
|
|
||||||
foreach ($intpairings as $intkey => $intpairing) {
|
foreach ($intpairings as $intkey => $intpairing) {
|
||||||
if (!is_null($intpairing->getOpponent())) {
|
if (!is_null($intpairing->getOpponent())) {
|
||||||
|
Loading…
Reference in New Issue
Block a user