DocsAPIPlayer

Player

A Player contains a unique id and a elo rating.

Example

import { Player } from 'teslo'
 
const player = new Player('1', 1000)

API

class Player {
  constructor(id: string, elo: number)
  static create(id: string, elo: number): Player
  getExpectedResult(opponentElo: number): number
  calculate(opponentElo: number, won: boolean, kFactor: number): number
}