diff --git a/Showing-the-pairings-of-a-specific-player.md b/Showing-the-pairings-of-a-specific-player.md index 7e56fc3..3ae119d 100644 --- a/Showing-the-pairings-of-a-specific-player.md +++ b/Showing-the-pairings-of-a-specific-player.md @@ -11,8 +11,9 @@ use JeroenED\Libpairtwo\Sws; use JeroenED\Libpairtwo\Player; use JeroenED\Libpairtwo\Enums\Result; -$sws = Sws::readSws('Tata-Steel-2018.sws'); -$magnusses = Player::getPlayersByName("Magnus Carlsen", $sws->getTournament()); +$filereader = IOFactory::createReader('Pairtwo-6'); +$filereader->read('Tata-Steel-2018.sws'); +$magnusses = Player::getPlayersByName("Magnus Carlsen", $filereader->getTournament()); $magnus = $magnusses[0]; foreach ($magnus->getPairings() as $pairing) {