Updated towards generalisation

Jeroen De Meerleer 2019-05-27 13:19:20 +02:00
parent 170ca13fc0
commit 22ad1e9860

@ -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) {