Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/distrobyte/multielo
Go implementation of the chess ELO system, but for more than 2 players
https://github.com/distrobyte/multielo
elo golang
Last synced: 1 day ago
JSON representation
Go implementation of the chess ELO system, but for more than 2 players
- Host: GitHub
- URL: https://github.com/distrobyte/multielo
- Owner: DistroByte
- License: mit
- Created: 2024-09-08T14:10:21.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2024-09-11T18:52:28.000Z (2 months ago)
- Last Synced: 2024-09-12T05:05:11.198Z (2 months ago)
- Topics: elo, golang
- Language: Go
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Multiplayer Elo Rating System
This is a simple implementation of the Elo rating system for multiplayer games. The system is based on the [Elo rating system](https://en.wikipedia.org/wiki/Elo_rating_system) which is a method for calculating the relative skill levels of players in two-player games such as chess. The system is used in many games and sports to rank players based on their performance.
[![Go Report Card](https://goreportcard.com/badge/github.com/distrobyte/multielo)](https://goreportcard.com/report/github.com/distrobyte/multielo)
## Installation
```bash
go get github.com/distrobyte/multielo
```## Usage
```go
package mainimport (
"fmt"
elo "github.com/distrobyte/multielo"
)func main() {
// Create a new league
league := elo.NewLeague()// Add players to the league
league.AddPlayer("player1")
league.AddPlayer("player2")// Get the ELO of a player
player := league.GetPlayer("player1")
fmt.Println(player.ELO)
}
```