mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-11-24 15:31:00 +01:00
Fixed use of Points
This commit is contained in:
parent
9cda048633
commit
c3170846c6
@ -786,7 +786,7 @@ class Tournament
|
|||||||
{
|
{
|
||||||
$tiebreak = 0;
|
$tiebreak = 0;
|
||||||
foreach ($player->Pairings as $plkey => $plpairing) {
|
foreach ($player->Pairings as $plkey => $plpairing) {
|
||||||
if (($plpairing->Opponent->Points / count($plpairing->Opponent->Pairings) * 100) >= $cut) {
|
if (($plpairing->Opponent->calculatePoints() / count($plpairing->Opponent->Pairings) * 100) >= $cut) {
|
||||||
if (array_search($plpairing->Result, Constants::Won) !== false) {
|
if (array_search($plpairing->Result, Constants::Won) !== false) {
|
||||||
$tiebreak += 1;
|
$tiebreak += 1;
|
||||||
} elseif (array_search($plpairing->Result, Constants::Draw) !== false) {
|
} elseif (array_search($plpairing->Result, Constants::Draw) !== false) {
|
||||||
@ -856,9 +856,9 @@ class Tournament
|
|||||||
foreach ($player->Pairings as $key => $pairing) {
|
foreach ($player->Pairings as $key => $pairing) {
|
||||||
if ($pairing->Opponent) {
|
if ($pairing->Opponent) {
|
||||||
if (array_search($pairing->Result, Constants::Won) !== false) {
|
if (array_search($pairing->Result, Constants::Won) !== false) {
|
||||||
$tiebreak += $pairing->Opponent->Points;
|
$tiebreak += $pairing->Opponent->calculatePoints();
|
||||||
} elseif (array_search($pairing->Result, Constants::Draw) !== false) {
|
} elseif (array_search($pairing->Result, Constants::Draw) !== false) {
|
||||||
$tiebreak += $pairing->Opponent->Points / 2;
|
$tiebreak += $pairing->Opponent->calculatePoints() / 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user