mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-10-11 04:45:01 +02:00
Merge branch 'develop'
This commit is contained in:
commit
2ca18a3271
@ -301,9 +301,9 @@ class Player
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getElo(string $type): int
|
||||
public function getElo(string $type): ?int
|
||||
{
|
||||
return $this->Elos[ $type ];
|
||||
return isset($this->Elos[ $type ]) ? $this->Elos[ $type ] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -14,6 +14,7 @@ namespace JeroenED\Libpairtwo;
|
||||
use Closure;
|
||||
use DateTime;
|
||||
use JeroenED\Libpairtwo\Enums\Color;
|
||||
use JeroenED\Libpairtwo\Enums\Result;
|
||||
use JeroenED\Libpairtwo\Enums\Tiebreak;
|
||||
use JeroenED\Libpairtwo\Enums\TournamentSystem;
|
||||
|
||||
@ -728,7 +729,7 @@ class Tournament
|
||||
$tiebreak += $pairing->Opponent->calculatePointsForTiebreaks() / 2;
|
||||
}
|
||||
}
|
||||
if (array_search($pairing->Result, Constants::NOTPLAYED) !== false) {
|
||||
if ($pairing->Result == Result::WON_BYE) {
|
||||
$tiebreak += $player->calculatePointsForVirtualPlayer($key);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user