Skip to content

Calculate Elo ratings in games for 2+ players or teams

Notifications You must be signed in to change notification settings

ingvardm/calc-u-rating

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instalation

npm i calc-u-rating -S

Usage

Two players game:

import { processSession } from 'calc-u-rating'

gameRasult = [
    { //player 1
        rating:1100,
        place: 2
    },
    { //player 2
        rating:1500,
        place: 1
    }
]

console.log(processSession(gameRasult))

Teams:

import * as calculator from 'calc-u-rating'

calculator.configure({
    RSDF: 800,
    K: () => 16
})

let teams = [
    { //team 1
        rating:[1100,1200],
        place: 3
    },
    { //team 2
        rating:[1250,1350],
        place: 2
    },
    { //team 3
        rating:[1450,1550],
        place: 1
    },
    { //team 4
        rating:[1211,1341],
        place: 2
    }
];

console.log(calculator.processSession(teams))

About

Calculate Elo ratings in games for 2+ players or teams

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published