From 170ca13fc09dc77cf22aea5ac6eec148d4eb428b Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Mon, 27 May 2019 13:18:27 +0200 Subject: [PATCH] Updated towards generalisation --- Showing-a-ranking.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Showing-a-ranking.md b/Showing-a-ranking.md index 0411e35..f8db716 100644 --- a/Showing-a-ranking.md +++ b/Showing-a-ranking.md @@ -15,8 +15,10 @@ require_once('vendor/autoload.php'); Use JeroenED/Libpairtwo/Sws; -$sws = Sws::readSws('mycompetition.sws'); -$ranking = $sws->getTournament()->getRanking(); +$filereader = IOFactory::createReader('Pairtwo-6'); +$filereader->read('mycompetition.sws'); + +$ranking = $filereader->getTournament()->getRanking(); $count = 1; foreach($ranking as $player) { echo $count . ' ' . $player->getName() . '(' . $player.->getPoints() . ')';