Skip to content

nicolasbrugneaux/elo-js

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Elo-js Build Statuselo-js API Documentation

This is a small implemention of the Elo system. Based on wikipeda's information.

Trying to use ES6 features such as class to be fancy.

Installation

npm install elo-js

Usage

Browser

requireJS and browserify compatible.

<script src="elo-js/index.js"></script>

<script>
  var elo = new Elo();

  var player1Rating = 1200;
  var player2Rating = 1250;

  var newPlayer1Rating  = elo.ifWins( player1Rating, player2Rating );
  newPlayer1Rating      = elo.ifLoses( player1Rating, player2Rating );
  newPlayer1Rating      = elo.ifTies( player1Rating, player2Rating );
</script>

Node

  var Elo = require( 'elo-js' );
  var elo = new Elo();

  var player1Rating = 1200;
  var player2Rating = 1250;

  var newPlayer1Rating  = elo.ifWins( player1Rating, player2Rating );
  newPlayer1Rating      = elo.ifLoses( player1Rating, player2Rating );
  newPlayer1Rating      = elo.ifTies( player1Rating, player2Rating );

Contribute

Any idea, remarks? Fill an issue, drop a mail, feel free! ❤️

Build from source

git clone https://github.com/nicolasbrugneaux/elo-js.git
cd elo-js
npm install
gulp # watch src and runs tests

About

Elo algorithm implementation in JS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published