diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-01-06 08:15:11 +0100 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-01-06 08:15:11 +0100 |
| commit | 59cb8a7a10e79d1ef74801cb244889f94cd7f880 (patch) | |
| tree | cc208b6131bca8c1c7cf3a1e0be9925f889143e9 /main.py | |
| parent | b526260c4dc5335bc3bab7858ff529737425d266 (diff) | |
Nouvel an 2025main
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 111 |
1 files changed, 108 insertions, 3 deletions
@@ -5,8 +5,9 @@ from src.ladder import Ladder from src.player import Player from src.strategy import SimpleEloChangeStrategy -ladder = Ladder() -ladder.strategy = SimpleEloChangeStrategy() +ladder = Ladder( + strategy=SimpleEloChangeStrategy(), +) games: list[Game] = [ @@ -187,12 +188,116 @@ games: list[Game] = [ Player.Baptiste: 43, }, ), + Game( + datetime.fromisoformat("2024-05-08 12:00"), # ? + { + Player.Thomas: 54, + Player.Emma: 45, + Player.Pierre: 67, + }, + ), + Game( + datetime.fromisoformat("2024-05-08 13:24"), + { + Player.Thomas: 47, + Player.Emma: 46, + Player.Pierre: 56, + }, + ), + Game( + datetime.fromisoformat("2024-05-08 14:24"), # ? + { + Player.Thomas: 58, + Player.Emma: 68, + Player.Pierre: 69, + }, + ), + Game( + datetime.fromisoformat("2024-05-10 14:21"), + { + Player.Emma: 60, + Player.Baptiste: 45, + Player.Thomas: 59, + Player.Kim: 51, + Player.Theo: 47, + Player.Felix: 41, + }, + ), + Game( + datetime.fromisoformat("2024-05-10 15:00"), + { + Player.Emma: 51, + Player.Baptiste: 49, + Player.Thomas: 38, + Player.Felix: 61, + }, + ), + Game( + datetime.fromisoformat("2024-05-11 14:00"), + { + Player.Felix: 57, + Player.Kim: 38, + Player.Thomas: 62, + Player.Frost: 58, + Player.Pierre: 51, + Player.Martin: 58, + Player.Emma: 46, + }, + ), + # Game( + # datetime.fromisoformat("2024-05-24 12:00"), # ? + # { + # Player.Martin: 53, + # Player.Emma: 40, + # Player.Marius: 39, + # Player.Heloise: 44, + # }, + # ), + Game( + datetime.fromisoformat("2025-01-01 13:27"), + { + Player.Clementine: 55, + Player.Thomas: 73, + Player.Baptiste: 55, + Player.Felix: 50, + Player.Emma: 58, + }, + ), + Game( + datetime.fromisoformat("2025-01-01 13:58"), + { + Player.Clementine: 60, + Player.Thomas: 56, + Player.Theo: 60, + Player.Felix: 62, + Player.Emma: 47, + }, + ), + Game( + datetime.fromisoformat("2025-01-03 11:00"), + { + Player.Tanguy: 90, + Player.Clementine: 70, + Player.Martin: 72, + Player.Emma: 39, + }, + ), + Game( + datetime.fromisoformat("2025-01-03 11:45"), + { + Player.Tanguy: 62, + Player.Clementine: 86, + Player.Theo: 54, + Player.Martin: 94, + Player.Emma: 60, + }, + ), ] for game in games: print(game) print("=" * 30) - players_elo_updates = ladder.proccess_game(game) + players_elo_updates = ladder.process_game(game) for player, elo_update in players_elo_updates.items(): print( |
