ratings
Helper module for calculating ELO ratings adjustments and chance
Installation
> npm install ratings --save> yarn add ratings
Usage
const elo = // or ES6 // Return the chance of victory for theelo; // Calculate the rating adjustmentelo
API
chance
Returns the expected chance of victory for each player (0.00
-> 1.00
)
adjustment
See Options interface Returns the adjusted ratings based on the provided result Adjustment and score range can be adjusted in options
// 1: White win, 0: Draw, -1: Black win