mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-11-24 15:31:00 +01:00
Fixed getBye to return wonBye players
This commit is contained in:
parent
722cfe685a
commit
11b07f07d0
@ -50,7 +50,7 @@ class Round extends RoundModel
|
|||||||
$allPairings = $this->getPairings();
|
$allPairings = $this->getPairings();
|
||||||
$byePairings = [];
|
$byePairings = [];
|
||||||
foreach ($allPairings as $pairing) {
|
foreach ($allPairings as $pairing) {
|
||||||
if ($pairing->getResult() == Result::bye) {
|
if ($pairing->getResult() == Result::wonbye) {
|
||||||
$byePairings[] = $pairing;
|
$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 1: " . $sws->getTournament()->getPairings()[0]->getPlayer()->getName() . PHP_EOL;
|
||||||
echo "Player Pairing 2: " . $sws->getTournament()->getPairings()[1]->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 "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 1: " . $sws->getTournament()->getTiebreaks()[0]->getValue() . PHP_EOL;
|
||||||
echo "Tiebreak 2: " . $sws->getTournament()->getTiebreaks()[1]->getValue() . PHP_EOL;
|
echo "Tiebreak 2: " . $sws->getTournament()->getTiebreaks()[1]->getValue() . PHP_EOL;
|
||||||
echo "Tiebreak 3: " . $sws->getTournament()->getTiebreaks()[2]->getValue() . PHP_EOL;
|
echo "Tiebreak 3: " . $sws->getTournament()->getTiebreaks()[2]->getValue() . PHP_EOL;
|
||||||
|
Loading…
Reference in New Issue
Block a user