From 8ceb8c2f60668978b8862676ffb7b6b19a7e1ffa Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Fri, 27 Sep 2019 17:41:27 +0200 Subject: [PATCH] Baumbach treated bye as win --- src/Tournament.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Tournament.php b/src/Tournament.php index d47793d..cf06cb7 100644 --- a/src/Tournament.php +++ b/src/Tournament.php @@ -542,8 +542,10 @@ class Tournament { $totalwins = 0; foreach ($player->getPairings() as $pairing) { - if (array_search($pairing->getResult(), Constants::Won) !== false) { - $totalwins++; + if (array_search($pairing->getResult(), Constants::NotPlayed) === false) { + if (array_search($pairing->getResult(), Constants::Won) !== false) { + $totalwins++; + } } } return $totalwins;