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

Maintainers

Package info

github.com/Jleagle/elo-score-calculator

pkg:composer/jleagle/elo-score-calculator

Statistics

Installs: 176

Dependents: 0

Suggesters: 0

Stars: 8

Open Issues: 0

0.0.3 2015-11-18 10:50 UTC

This package is auto-updated.

Last update: 2026-03-09 17:21:52 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();