mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-11-21 22:17:41 +01:00
Moved points tiebreak to return Player::getPoints()
This commit is contained in:
parent
9bf31b7ec5
commit
4672c91298
@ -36,15 +36,7 @@ abstract class Tiebreaks extends Tournament
|
|||||||
*/
|
*/
|
||||||
protected function calculatePoints(Player $player): ?float
|
protected function calculatePoints(Player $player): ?float
|
||||||
{
|
{
|
||||||
$points = 0;
|
return $player->getPoints();
|
||||||
foreach ($player->getPairings() as $pairing) {
|
|
||||||
if (array_search($pairing->getResult(), Constants::Won) !== false) {
|
|
||||||
$points = $points + 1;
|
|
||||||
} elseif (array_search($pairing->getResult(), Constants::Draw) !== false) {
|
|
||||||
$points = $points + 0.5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $points;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user