Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/askbeka/elo
elo
https://github.com/askbeka/elo
Last synced: 4 days ago
JSON representation
elo
- Host: GitHub
- URL: https://github.com/askbeka/elo
- Owner: askbeka
- Created: 2017-05-03T21:47:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-03T21:49:03.000Z (over 7 years ago)
- Last Synced: 2024-10-18T11:50:37.472Z (about 1 month ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Game rankings
## Implement a ranking program using the Elo ranking algorithm.
### Given two files:
1. names, where each line has an ID number and a name for said ID
2. matches, where each line contains the ID of the two players of a match and the first one is the winner of said match.
### Implement a program that can read both files and then:
1. Score each player based on the games played
2. Generate a list of players sorted by score, their ranking (position in the list) and their number of wins and losses.
3. Generate a report for each person, showing with whom they played and how they fared.
4. Generate a list of suggested next matches.
### Implementation notes:
1. You can choose how to implement the different functionalities for the program. You may choose to implement it as a command line
parameter (e.g. "./elo names matches show_ranking", "elo names matches show_rank USER_NAME", etc).
2. Try to keep the output format independent of the main application logic (ie design it so that it is possible to add new output formats if
needed# Work Done
### Tech used:
1. node.js v.7.7.1
2. eslint for ineditor linting
### How to:
1. `cd elo`
2. `npm i -g`
3. `elo [names_file] [matches_file] [command] [argument]`
#### OR
1. `cd elo`
2. `node index.js names.txt matches.txt [command] [argument]`
### Supported commands
1. `show_ranking` - shows sorted player list with report,
2. `show_rank [player_name]` - shows one player details in report
3. `suggest_new` - shows suggested matches based on sorting method in requirements