From 8ceb8c2f60668978b8862676ffb7b6b19a7e1ffa Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Fri, 27 Sep 2019 17:41:27 +0200 Subject: [PATCH 1/2] 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; From b523de6f854622cf136a5f435e402f1aebd70123 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Fri, 27 Sep 2019 17:43:24 +0200 Subject: [PATCH 2/2] Updated changelog --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ab729c..4098148 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,10 @@ * NEW FEATURE: `Tournament::getArbiters` for multiple arbiters in 1 tournament * ENHANCEMENT: `Class::getBinaryData` methods return null if field is non-existent * CHANGE: `Tournament::getArbiter` accepts a `int` parameter representing the order of the arbiters -* BUGFIX: `Player:getId` returns elo instead of id +* BUGFIX: `Player:getId` returned elo instead of id * BUGFIX: `Tournament::calculateBuchholz` did not return the correct score when player had unplayed rounds -* BUGFIX: `Tournament::calculateMutualResult` Returned NULL if result was invalid +* BUGFIX: `Tournament::calculateMutualResult` returned NULL if result was invalid +* BUGFIX: `Tournament::calculateBaumbach` treated bye as won ## v1.1.2 (Release: 21-jun-2019) * ENHANCEMENT: Added update section to dist/readme.md