Updated towards generalisation

Jeroen De Meerleer 2019-05-27 13:18:27 +02:00
parent 6e3c972a2c
commit 170ca13fc0

@ -15,8 +15,10 @@ require_once('vendor/autoload.php');
Use JeroenED/Libpairtwo/Sws; Use JeroenED/Libpairtwo/Sws;
$sws = Sws::readSws('mycompetition.sws'); $filereader = IOFactory::createReader('Pairtwo-6');
$ranking = $sws->getTournament()->getRanking(); $filereader->read('mycompetition.sws');
$ranking = $filereader->getTournament()->getRanking();
$count = 1; $count = 1;
foreach($ranking as $player) { foreach($ranking as $player) {
echo $count . ' ' . $player->getName() . '(' . $player.->getPoints() . ')'; echo $count . ' ' . $player->getName() . '(' . $player.->getPoints() . ')';