Skip to content

Commit

Permalink
BUGFIX: Absent players were not read out properly
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenED committed Sep 26, 2019
1 parent 6fd0df6 commit 5350b75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Readers/Swar4.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,6 @@ public function read(string $filename): ReaderInterface
if ($this->getTournament()->getBinaryData('Pairing_' . $ptn . '_opponent') != 4294967295) {
$pairing->setOpponent($this->getTournament()->getPlayerById($inscriptionNos[$this->getTournament()->getBinaryData('Pairing_' . $ptn . '_opponent')]));
}
//echo $ptn . ' ' . $this->getTournament()->getBinaryData('Pairing_' . $ptn . '_round') . ' ' . $pairing->getPlayer()->getName() . ' - ' . $opponent . ' ' . $this->getTournament()->getBinaryData('Pairing_' . $ptn . '_result') . PHP_EOL;
switch ($this->getTournament()->getBinaryData('Pairing_' . $ptn . '_result')) {
case '1000':
$result = Result::lost;
Expand Down Expand Up @@ -456,6 +455,9 @@ public function read(string $filename): ReaderInterface
$result = Result::none;
break;
}
if ($this->getTournament()->getBinaryData('Pairing_' . $ptn . '_table') == 16384) {
$result = Result::absent;
}
$pairing->setResult(new Result($result));

switch ($this->getTournament()->getBinaryData('Pairing_' . $ptn . '_color')) {
Expand Down

0 comments on commit 5350b75

Please sign in to comment.