Skip to content

A PHP class which implements the Elo rating system

Notifications You must be signed in to change notification settings

konpa/elo-rating

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 

Repository files navigation

#Elo Rating PHP A PHP class which implements the Elo rating system.

#Usage

require 'src/Rating/Rating.php';

// player A elo = 1000
// player B elo = 2000
// player A lost
// player B win

$rating = new Rating(1000, 2000, 0, 1);

// player A elo = 1000
// player B elo = 2000
// player A draw
// player B draw

$rating = new Rating(1000, 2000, .5, .5);

$results = $rating->getNewRatings();

echo "New rating for player A: " . $results['a'];
echo "New rating for player B: " . $results['b'];

#Credits

Creative Commons License
Elo Rating PHP by Michal Chovanec is licensed under a Creative Commons Attribution 4.0 International License.

About

A PHP class which implements the Elo rating system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%