mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-12-22 20:31:21 +01:00
BUGFIX: Round::getBye() did not return bye players
This commit is contained in:
parent
38e1d23fee
commit
6cdb0aac6a
@ -50,7 +50,7 @@ class Round extends RoundModel
|
||||
$allPairings = $this->getPairings();
|
||||
$byePairings = [];
|
||||
foreach ($allPairings as $pairing) {
|
||||
if ($pairing->getResult() == Result::bye) {
|
||||
if ($pairing->getResult() == Result::wonbye) {
|
||||
$byePairings[] = $pairing;
|
||||
}
|
||||
}
|
||||
|
@ -70,6 +70,8 @@ echo "Color Pairing 3: " . $sws->getTournament()->getPairings()[3]->getColor()->
|
||||
echo "Player Pairing 1: " . $sws->getTournament()->getPairings()[0]->getPlayer()->getName() . PHP_EOL;
|
||||
echo "Player Pairing 2: " . $sws->getTournament()->getPairings()[1]->getPlayer()->getName() . PHP_EOL;
|
||||
echo "Player Pairing 3: " . $sws->getTournament()->getPairings()[2]->getPlayer()->getName() . PHP_EOL;
|
||||
echo "Bye Round 1: " . $sws->getTournament()->getRoundByNo(2)->getBye()[0]->getPlayer()->getName() . PHP_EOL;
|
||||
echo "Absent Round 1: " . $sws->getTournament()->getRoundByNo(2)->getAbsent()[0]->getPlayer()->getName() . PHP_EOL;
|
||||
echo "Tiebreak 1: " . $sws->getTournament()->getTiebreaks()[0]->getValue() . PHP_EOL;
|
||||
echo "Tiebreak 2: " . $sws->getTournament()->getTiebreaks()[1]->getValue() . PHP_EOL;
|
||||
echo "Tiebreak 3: " . $sws->getTournament()->getTiebreaks()[2]->getValue() . PHP_EOL;
|
||||
|
Loading…
Reference in New Issue
Block a user