Skip to content

A PHP class to generate points using an ELO rating system

Notifications You must be signed in to change notification settings

Jleagle/elo-score-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elo-score-calculator

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

About

A PHP class to generate points using an ELO rating system

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages