|
|
@ -86,7 +86,7 @@ class TrueSkillCalculatorTests
|
|
|
|
|
|
|
|
|
|
|
|
$team1 = new Team($player1, $gameInfo->getDefaultRating());
|
|
|
|
$team1 = new Team($player1, $gameInfo->getDefaultRating());
|
|
|
|
$team2 = new Team($player2, $gameInfo->getDefaultRating());
|
|
|
|
$team2 = new Team($player2, $gameInfo->getDefaultRating());
|
|
|
|
$teams = Teams::concat($team1, $team2);
|
|
|
|
$teams = [$team1, $team2];
|
|
|
|
|
|
|
|
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
|
|
|
|
|
|
|
@ -109,7 +109,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team1 = new Team($player1, $gameInfo->getDefaultRating());
|
|
|
|
$team1 = new Team($player1, $gameInfo->getDefaultRating());
|
|
|
|
$team2 = new Team($player2, $gameInfo->getDefaultRating());
|
|
|
|
$team2 = new Team($player2, $gameInfo->getDefaultRating());
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2);
|
|
|
|
$teams = [$team1, $team2];
|
|
|
|
|
|
|
|
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 1]);
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 1]);
|
|
|
|
|
|
|
|
|
|
|
@ -132,7 +132,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team1 = new Team($player1, new Rating(1301.0007, 42.9232));
|
|
|
|
$team1 = new Team($player1, new Rating(1301.0007, 42.9232));
|
|
|
|
$team2 = new Team($player2, new Rating(1188.7560, 42.5570));
|
|
|
|
$team2 = new Team($player2, new Rating(1188.7560, 42.5570));
|
|
|
|
|
|
|
|
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, Teams::concat($team1, $team2), [1, 2]);
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, [$team1, $team2], [1, 2]);
|
|
|
|
|
|
|
|
|
|
|
|
$player1NewRating = $newRatings->getRating($player1);
|
|
|
|
$player1NewRating = $newRatings->getRating($player1);
|
|
|
|
self::assertRating($testClass, 1304.7820836053318, 42.843513887848658, $player1NewRating);
|
|
|
|
self::assertRating($testClass, 1304.7820836053318, 42.843513887848658, $player1NewRating);
|
|
|
@ -153,7 +153,7 @@ class TrueSkillCalculatorTests
|
|
|
|
|
|
|
|
|
|
|
|
$team2 = new Team($player2, new Rating(50, 12.5));
|
|
|
|
$team2 = new Team($player2, new Rating(50, 12.5));
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2);
|
|
|
|
$teams = [$team1, $team2];
|
|
|
|
|
|
|
|
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 1]);
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 1]);
|
|
|
|
|
|
|
|
|
|
|
@ -184,7 +184,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team2->addPlayer($player2, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player2, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player3, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player3, $gameInfo->getDefaultRating());
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2);
|
|
|
|
$teams = [$team1, $team2];
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
|
|
|
|
|
|
|
|
// Winners
|
|
|
|
// Winners
|
|
|
@ -219,7 +219,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team2->addPlayer($player3, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player3, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player4, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player4, $gameInfo->getDefaultRating());
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2);
|
|
|
|
$teams = [$team1, $team2];
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
|
|
|
|
|
|
|
|
// Winners
|
|
|
|
// Winners
|
|
|
@ -249,7 +249,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team2->addPlayer($player2, new Rating(20, 7));
|
|
|
|
$team2->addPlayer($player2, new Rating(20, 7));
|
|
|
|
$team2->addPlayer($player3, new Rating(25, 8));
|
|
|
|
$team2->addPlayer($player3, new Rating(25, 8));
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2);
|
|
|
|
$teams = [$team1, $team2];
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
|
|
|
|
|
|
|
|
// Winners
|
|
|
|
// Winners
|
|
|
@ -280,7 +280,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team2->addPlayer($player3, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player3, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player4, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player4, $gameInfo->getDefaultRating());
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2);
|
|
|
|
$teams = [$team1, $team2];
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
|
|
|
|
|
|
|
|
// Winners
|
|
|
|
// Winners
|
|
|
@ -310,7 +310,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team2->addPlayer($player2, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player2, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player3, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player3, $gameInfo->getDefaultRating());
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2);
|
|
|
|
$teams = [$team1, $team2];
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 1]);
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 1]);
|
|
|
|
|
|
|
|
|
|
|
|
// Winners
|
|
|
|
// Winners
|
|
|
@ -341,7 +341,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team2->addPlayer($player3, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player3, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player4, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player4, $gameInfo->getDefaultRating());
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2);
|
|
|
|
$teams = [$team1, $team2];
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 1]);
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 1]);
|
|
|
|
|
|
|
|
|
|
|
|
// Winners
|
|
|
|
// Winners
|
|
|
@ -381,7 +381,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team2->addPlayer($player7, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player7, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player8, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player8, $gameInfo->getDefaultRating());
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2);
|
|
|
|
$teams = [$team1, $team2];
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
|
|
|
|
|
|
|
|
// Winners
|
|
|
|
// Winners
|
|
|
@ -419,7 +419,7 @@ class TrueSkillCalculatorTests
|
|
|
|
|
|
|
|
|
|
|
|
$gameInfo = new GameInfo();
|
|
|
|
$gameInfo = new GameInfo();
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2);
|
|
|
|
$teams = [$team1, $team2];
|
|
|
|
$newRatingsWinLoseExpected = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
$newRatingsWinLoseExpected = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
|
|
|
|
|
|
|
|
// Winners
|
|
|
|
// Winners
|
|
|
@ -431,7 +431,7 @@ class TrueSkillCalculatorTests
|
|
|
|
self::assertRating($testClass, 29.785, 3.958, $newRatingsWinLoseExpected->getRating($player4));
|
|
|
|
self::assertRating($testClass, 29.785, 3.958, $newRatingsWinLoseExpected->getRating($player4));
|
|
|
|
self::assertRating($testClass, 30.879, 2.983, $newRatingsWinLoseExpected->getRating($player5));
|
|
|
|
self::assertRating($testClass, 30.879, 2.983, $newRatingsWinLoseExpected->getRating($player5));
|
|
|
|
|
|
|
|
|
|
|
|
$newRatingsWinLoseUpset = $calculator->calculateNewRatings($gameInfo, Teams::concat($team1, $team2), [2, 1]);
|
|
|
|
$newRatingsWinLoseUpset = $calculator->calculateNewRatings($gameInfo, [$team1, $team2], [2, 1]);
|
|
|
|
|
|
|
|
|
|
|
|
// Winners
|
|
|
|
// Winners
|
|
|
|
self::assertRating($testClass, 32.012, 3.877, $newRatingsWinLoseUpset->getRating($player4));
|
|
|
|
self::assertRating($testClass, 32.012, 3.877, $newRatingsWinLoseUpset->getRating($player4));
|
|
|
@ -463,7 +463,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team2->addPlayer($player3, new Rating(25, 4));
|
|
|
|
$team2->addPlayer($player3, new Rating(25, 4));
|
|
|
|
$team2->addPlayer($player4, new Rating(30, 3));
|
|
|
|
$team2->addPlayer($player4, new Rating(30, 3));
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2);
|
|
|
|
$teams = [$team1, $team2];
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 1]);
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 1]);
|
|
|
|
|
|
|
|
|
|
|
|
// Winners
|
|
|
|
// Winners
|
|
|
@ -495,7 +495,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team2->addPlayer($player3, new Rating(35, 7));
|
|
|
|
$team2->addPlayer($player3, new Rating(35, 7));
|
|
|
|
$team2->addPlayer($player4, new Rating(40, 5));
|
|
|
|
$team2->addPlayer($player4, new Rating(40, 5));
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2);
|
|
|
|
$teams = [$team1, $team2];
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
|
|
|
|
|
|
|
|
// Winners
|
|
|
|
// Winners
|
|
|
@ -535,7 +535,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team2->addPlayer($player7, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player7, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player8, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player8, $gameInfo->getDefaultRating());
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2);
|
|
|
|
$teams = [$team1, $team2];
|
|
|
|
|
|
|
|
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
|
|
|
|
|
|
|
@ -572,7 +572,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team2->addPlayer($player3, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player3, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player4, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($player4, $gameInfo->getDefaultRating());
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2);
|
|
|
|
$teams = [$team1, $team2];
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 1]);
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 1]);
|
|
|
|
|
|
|
|
|
|
|
|
// Winners
|
|
|
|
// Winners
|
|
|
@ -598,7 +598,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team2 = new Team($player2, $gameInfo->getDefaultRating());
|
|
|
|
$team2 = new Team($player2, $gameInfo->getDefaultRating());
|
|
|
|
$team3 = new Team($player3, $gameInfo->getDefaultRating());
|
|
|
|
$team3 = new Team($player3, $gameInfo->getDefaultRating());
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2, $team3);
|
|
|
|
$teams = [$team1, $team2, $team3];
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2, 3]);
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2, 3]);
|
|
|
|
|
|
|
|
|
|
|
|
$player1NewRating = $newRatings->getRating($player1);
|
|
|
|
$player1NewRating = $newRatings->getRating($player1);
|
|
|
@ -625,7 +625,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team2 = new Team($player2, $gameInfo->getDefaultRating());
|
|
|
|
$team2 = new Team($player2, $gameInfo->getDefaultRating());
|
|
|
|
$team3 = new Team($player3, $gameInfo->getDefaultRating());
|
|
|
|
$team3 = new Team($player3, $gameInfo->getDefaultRating());
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2, $team3);
|
|
|
|
$teams = [$team1, $team2, $team3];
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 1, 1]);
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 1, 1]);
|
|
|
|
|
|
|
|
|
|
|
|
$player1NewRating = $newRatings->getRating($player1);
|
|
|
|
$player1NewRating = $newRatings->getRating($player1);
|
|
|
@ -653,7 +653,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team3 = new Team($player3, $gameInfo->getDefaultRating());
|
|
|
|
$team3 = new Team($player3, $gameInfo->getDefaultRating());
|
|
|
|
$team4 = new Team($player4, $gameInfo->getDefaultRating());
|
|
|
|
$team4 = new Team($player4, $gameInfo->getDefaultRating());
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2, $team3, $team4);
|
|
|
|
$teams = [$team1, $team2, $team3, $team4];
|
|
|
|
|
|
|
|
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2, 3, 4]);
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2, 3, 4]);
|
|
|
|
|
|
|
|
|
|
|
@ -687,7 +687,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team4 = new Team($player4, $gameInfo->getDefaultRating());
|
|
|
|
$team4 = new Team($player4, $gameInfo->getDefaultRating());
|
|
|
|
$team5 = new Team($player5, $gameInfo->getDefaultRating());
|
|
|
|
$team5 = new Team($player5, $gameInfo->getDefaultRating());
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2, $team3, $team4, $team5);
|
|
|
|
$teams = [$team1, $team2, $team3, $team4, $team5];
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2, 3, 4, 5]);
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2, 3, 4, 5]);
|
|
|
|
|
|
|
|
|
|
|
|
$player1NewRating = $newRatings->getRating($player1);
|
|
|
|
$player1NewRating = $newRatings->getRating($player1);
|
|
|
@ -729,7 +729,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team7 = new Team($player7, $gameInfo->getDefaultRating());
|
|
|
|
$team7 = new Team($player7, $gameInfo->getDefaultRating());
|
|
|
|
$team8 = new Team($player8, $gameInfo->getDefaultRating());
|
|
|
|
$team8 = new Team($player8, $gameInfo->getDefaultRating());
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2, $team3, $team4, $team5, $team6, $team7, $team8);
|
|
|
|
$teams = [$team1, $team2, $team3, $team4, $team5, $team6, $team7, $team8];
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 1, 1, 1, 1, 1, 1, 1]);
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 1, 1, 1, 1, 1, 1, 1]);
|
|
|
|
|
|
|
|
|
|
|
|
$player1NewRating = $newRatings->getRating($player1);
|
|
|
|
$player1NewRating = $newRatings->getRating($player1);
|
|
|
@ -781,7 +781,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team7 = new Team($player7, new Rating(40, 2));
|
|
|
|
$team7 = new Team($player7, new Rating(40, 2));
|
|
|
|
$team8 = new Team($player8, new Rating(45, 1));
|
|
|
|
$team8 = new Team($player8, new Rating(45, 1));
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2, $team3, $team4, $team5, $team6, $team7, $team8);
|
|
|
|
$teams = [$team1, $team2, $team3, $team4, $team5, $team6, $team7, $team8];
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2, 3, 4, 5, 6, 7, 8]);
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2, 3, 4, 5, 6, 7, 8]);
|
|
|
|
|
|
|
|
|
|
|
|
$player1NewRating = $newRatings->getRating($player1);
|
|
|
|
$player1NewRating = $newRatings->getRating($player1);
|
|
|
@ -849,7 +849,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team15 = new Team($player15, $gameInfo->getDefaultRating());
|
|
|
|
$team15 = new Team($player15, $gameInfo->getDefaultRating());
|
|
|
|
$team16 = new Team($player16, $gameInfo->getDefaultRating());
|
|
|
|
$team16 = new Team($player16, $gameInfo->getDefaultRating());
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat(
|
|
|
|
$teams = [
|
|
|
|
$team1,
|
|
|
|
$team1,
|
|
|
|
$team2,
|
|
|
|
$team2,
|
|
|
|
$team3,
|
|
|
|
$team3,
|
|
|
@ -866,7 +866,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team14,
|
|
|
|
$team14,
|
|
|
|
$team15,
|
|
|
|
$team15,
|
|
|
|
$team16
|
|
|
|
$team16
|
|
|
|
);
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
$newRatings = $calculator->calculateNewRatings(
|
|
|
|
$newRatings = $calculator->calculateNewRatings(
|
|
|
|
$gameInfo,
|
|
|
|
$gameInfo,
|
|
|
@ -952,7 +952,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team3->addPlayer($player7, new Rating(50, 5));
|
|
|
|
$team3->addPlayer($player7, new Rating(50, 5));
|
|
|
|
$team3->addPlayer($player8, new Rating(30, 2));
|
|
|
|
$team3->addPlayer($player8, new Rating(30, 2));
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2, $team3);
|
|
|
|
$teams = [$team1, $team2, $team3];
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2, 2]);
|
|
|
|
$newRatingsWinLose = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2, 2]);
|
|
|
|
|
|
|
|
|
|
|
|
// Winners
|
|
|
|
// Winners
|
|
|
@ -986,7 +986,7 @@ class TrueSkillCalculatorTests
|
|
|
|
$team2->addPlayer($p2, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($p2, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($p3, $gameInfo->getDefaultRating());
|
|
|
|
$team2->addPlayer($p3, $gameInfo->getDefaultRating());
|
|
|
|
|
|
|
|
|
|
|
|
$teams = Teams::concat($team1, $team2);
|
|
|
|
$teams = [$team1, $team2];
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
$newRatings = $calculator->calculateNewRatings($gameInfo, $teams, [1, 2]);
|
|
|
|
|
|
|
|
|
|
|
|
$p1NewRating = $newRatings->getRating($p1);
|
|
|
|
$p1NewRating = $newRatings->getRating($p1);
|
|
|
|