-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathexample.py
More file actions
34 lines (19 loc) · 796 Bytes
/
example.py
File metadata and controls
34 lines (19 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from elo_system import *
elo = EloSystem(base_elo = 1200, k = 42)
elo.add_player("John", 2100)
elo.add_player("Marcus", 1400)
elo.add_player("CasualTryhard")
elo.add_player("AnotherCasualTryhard")
print(elo.get_player_elo("Marcus"))
print(elo.get_overall_list())
elo.record_match("John", "Marcus", winner = "Marcus")
print(elo.get_overall_list())
elo.record_match("John", "CasualTryhard", winner = "CasualTryhard")
print(elo.get_overall_list())
elo.record_match("CasualTryhard", "AnotherCasualTryhard", winner = "AnotherCasualTryhard")
print(elo.get_overall_list())
print(elo.get_player_rank("CasualTryhard"))
print(elo.get_player_count())
print(elo.get_players_with_rank("Bronze"))
elo.remove_elo("Marcus", 100)
print(elo.get_player_elo("Marcus"))