Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mabaro3009 committed Apr 18, 2022
1 parent aaa749a commit 1969ab4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,21 @@ expScore := e.GetExpectedScore(1750, 1500, 2)
// a player with a rating of 1500.
// Use 0 to indicate the first player wins, 1 for the second player
// and 2 for a draw.
newRatingA, newRatingB, err := e.GetNewRatings(1750, 1500, 0)
ratings := []int{1750, 1500}
newRatiings, err := e.GetNewRatings(ratings, 0)
teamA := []int{1000, 1500}
teamB := []int{1300, 1400}
ratings := [][]int{teamA, teamB}
// Get the new ratings when teamA beats teamB in a 2vs2 match.
newRatingsA, newRatingsB, err := e.GetNewRatingsTeams(teamA, teamB, 0)
// Get the new ratings when teamB beats teamA in a 2vs2 match.
newRatings, err := e.GetNewRatingsTeams(ratings, 1)
// Get the new ratings when there is a draw in a 1vs1vs1 match.
ratings := []int{1000, 1200, 1500}
newRatiings, err := e.GetNewRatings(ratings, 3)
```

Example initializacion with custom values:
Expand Down

0 comments on commit 1969ab4

Please sign in to comment.