Updated Showing the pairings of a specific player (markdown)

Jeroen De Meerleer 2019-05-01 20:10:23 +02:00
parent 03c9500e3c
commit e3610be2fb

@ -21,11 +21,12 @@ foreach ($magnus->getPairings() as $pairing) {
if (!is_null($pairing->getOpponent())) { if (!is_null($pairing->getOpponent())) {
$opponent = $pairing->getOpponent()->getName(); $opponent = $pairing->getOpponent()->getName();
$color = $pairing->getColor()->getKey(); $color = $pairing->getColor()->getKey();
echo $player . ' against ' . $opponent . ' using ' . $color . PHP_EOL; echo $player . ' ' . $pairing->getResult()->getKey() . ' against ' . $opponent . ' using ' . $color . PHP_EOL;
} elseif ($pairing->getResult() == Result::bye ) { } elseif ($pairing->getResult() == Result::bye) {
echo $player . ' is bye' . PHP_EOL; echo $player . ' is bye' . PHP_EOL;
} elseif ($pairing->getResult() == Result::absent ) { } elseif ($pairing->getResult() == Result::absent) {
echo $player . ' is absent' . PHP_EOL; echo $player . ' is absent' . PHP_EOL;
} }
} }
``` ```