From 22ad1e98607e311bb60518ac921c5c3fa471753e Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Mon, 27 May 2019 13:19:20 +0200 Subject: [PATCH] Updated towards generalisation --- Showing-the-pairings-of-a-specific-player.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) {