Usage
Determine what type of game mode you want to use between Duel
, TeamDuel
, FreeForAll
, or TeamFreeForAll
.
You will use the Player
and/or Team
objects to store elo for each contestant.
Each game mode supports a calculate
method which determines the winner or winning order of contestants.
Example
import { Player, Duel } from 'teslo'
const match = new Duel([new Player('1', 1000), new Player('2', 900)])
const results = match.calculate('1')
/*
[
{
id: '1',
elo: 1012
},
{
id: '2',
elo: 888
}
]
*/