mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-12-21 20:06:05 +01:00
Merge branch 'develop'
This commit is contained in:
commit
2ca18a3271
@ -301,9 +301,9 @@ class Player
|
|||||||
*
|
*
|
||||||
* @return int
|
* @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 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;
|
||||||
|
|
||||||
@ -728,7 +729,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user