BUGFIX: Sonneborn scoring was incorrect

This commit is contained in:
Jeroen De Meerleer 2023-01-09 12:24:20 +01:00
parent 94b18d3d9b
commit 6c7249bd3e
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6

View File

@ -14,6 +14,7 @@ namespace JeroenED\Libpairtwo;
use Closure; use Closure;
use DateTime; use DateTime;
use JeroenED\Libpairtwo\Enums\Color; use JeroenED\Libpairtwo\Enums\Color;
use JeroenED\Libpairtwo\Enums\Result;
use JeroenED\Libpairtwo\Enums\Tiebreak; use JeroenED\Libpairtwo\Enums\Tiebreak;
use JeroenED\Libpairtwo\Enums\TournamentSystem; use JeroenED\Libpairtwo\Enums\TournamentSystem;
@ -727,7 +728,7 @@ class Tournament
$tiebreak += $pairing->Opponent->calculatePointsForTiebreaks() / 2; $tiebreak += $pairing->Opponent->calculatePointsForTiebreaks() / 2;
} }
} }
if (array_search($pairing->Result, Constants::NOTPLAYED) !== false) { if ($pairing->Result === Result::WON_BYE) {
$tiebreak += $player->calculatePointsForVirtualPlayer($key); $tiebreak += $player->calculatePointsForVirtualPlayer($key);
} }
} }