jleagle/elo-score-calculator

There is no license information available for the latest version (0.0.3) of this package.

Calculate expected score and new ELO score

0.0.3 2015-11-18 10:50 UTC

This package is auto-updated.

Last update: 2024-11-09 13:55:42 UTC


README

Build Status (Scrutinizer) Code Quality (scrutinizer) Latest Stable Version Latest Unstable Version

Calculate expected score and new ELO score

Usage

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();