Calculate expected score and new ELO score
Add Elo to your composer.json
{
"require": {
"jleagle/elo-score-calculator": "*"
}
}
Download the package
$ php composer.phar update jleagle/elo-score-calculator
Give Elo the players current scores and who won/lost/drew
$elo = new Elo(
90, 60, Elo::WIN, Elo::LOST
);
$elo = new Elo(
90, 90, Elo::DRAW, Elo::DRAW
);
Get the chance of each player winning
$expectedScore = $elo->getExpected();
Get the players new scores
$newRatings = $elo->getRatings();