Updated point calculation for Swiss system
The point calculation for virtual players and tiebreaks has been updated to only apply when the tournament system is set to Swiss. This change ensures that points are calculated correctly based on the specific rules of each tournament system.
This commit is contained in:
parent
2d9fbe8433
commit
ff8d372a8f
@ -525,7 +525,7 @@ class Tournament
|
||||
foreach ($intpairingsWithBye as $key => $pairing) {
|
||||
$roundstoplay = (count($intpairingsWithBye)) - $curround;
|
||||
if (is_null($pairing->Opponent)) {
|
||||
$intpairings[] = $player->calculatePointsForVirtualPlayer($key);
|
||||
if($this->System == TournamentSystem::SWISS) $intpairings[] = $player->calculatePointsForVirtualPlayer($key);
|
||||
} else {
|
||||
$intpairings[] = $pairing->Opponent->calculatePointsForTiebreaks();
|
||||
if (array_search($pairing->Result, Constants::WON) !== false) {
|
||||
@ -730,7 +730,7 @@ class Tournament
|
||||
}
|
||||
}
|
||||
if ($pairing->Result == Result::WON_BYE) {
|
||||
$tiebreak += $player->calculatePointsForVirtualPlayer($key);
|
||||
if($this->System == TournamentSystem::SWISS) $tiebreak += $player->calculatePointsForVirtualPlayer($key);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user