BUGFIX: mutual result did not take care of all previous tiebreaks

This commit is contained in:
Jeroen De Meerleer 2019-06-04 16:49:12 +02:00
parent 112240a038
commit 605c7819d2
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6

View File

@ -98,8 +98,12 @@ abstract class Tiebreaks extends Tournament
$interestingplayers = $opponents; $interestingplayers = $opponents;
if ($key != 0) { if ($key != 0) {
$interestingplayers = []; $interestingplayers = [];
$playerstiebreaks = $player->getTiebreaks();
array_splice($playerstiebreaks, $key);
foreach ($opponents as $opponent) { foreach ($opponents as $opponent) {
if (($opponent->getTiebreaks()[$key - 1] == $player->getTiebreaks()[$key - 1]) && ($player != $opponent)) { $opponenttiebreaks = $opponent->getTiebreaks();
array_splice($opponenttiebreaks, $key);
if (($playerstiebreaks == $opponenttiebreaks) && ($player != $opponent)) {
$interestingplayers[] = $opponent; $interestingplayers[] = $opponent;
} }
} }