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() . ')';