Skip to content

Kobrasadetin/elo-rankings

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

elo-rankings

A simple service I wrote to keep track of the ELO rating of foosball players at work, but it can be used to create a league for any type of game. It has a web api and a slack bot interface.

ELO is a system used mostly in chess and video games to rate the skill level of players. Read more about ELO rating here: https://en.wikipedia.org/wiki/Elo_rating_system

Run the server

Requires node 8 or higher.

Install dependencies with npm install then start the server with npm start.

Todo list

  • Generate graphs and expose them through http and slack

Slack bot integration

You can interact with the service through slack if you specify your slack API token and channel in config.json.

Web API

GET: /

Returns the entire list of players sorted by ELO rating

POST: /players

Creates a new player starting at ELO 1000.

Request body:

{
  "name": <new players name>
}

POST: /game

Calculates and updates the Elo rating of the winner and loser of a game

Request body:

{
  "winner": <winner name>,
  "loser": <loser name>
}

POST: /game/nvn

Calculates and updates the Elo rating of the winners and losers of a N vs N game. The number of winners and losers must be the same for this calculation to work.

Request body:

{
  "winners": [
    <winner 1 name>,
    <winner 2 name>,
  ],
  "losers": [
    <loser 1 name>,
    <loser 2 name>,
  ]
}

License

This software can be used under the ISC license

About

A simple service to rank players based on ELO rating

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%