Skip to content

williamgrosset/teslo

Repository files navigation

logo

Build status NPM version Downloads Dependencies Build size

A lightweight JavaScript library for calculating elo rating in multiplayer games.

Quickstart

Install the teslo package.

npm install teslo

Create a Duel and calculate elo ratings.

import { Player, Duel } from 'teslo'

// Create a duel between 2 players
const match = new Duel([new Player('1', 1000), new Player('2', 900)])

// Calculate elo ratings for player 1 win
const results = match.calculate('1')

/*
[
  {
    id: '1',
    elo: 1012
  },
  {
    id: '2',
    elo: 888
  }
]
*/

Documentation

Visit teslo.dev/docs.

License

MIT