diff options
author | Dmitrii Morozov <snoopdesigns@gmail.com> | 2024-11-04 18:56:52 +0100 |
---|---|---|
committer | Dmitrii Morozov <snoopdesigns@gmail.com> | 2024-11-04 18:56:52 +0100 |
commit | 75008514a3b309e002f477b36bd0ea1f2456db40 (patch) | |
tree | f216229fb2b40da490e02570c15d4b9403355b89 /formatter/__init__.py | |
parent | 3b1d1c6343431301f2e584edd669f33319203f1b (diff) |
Format level difference correctly during season change
Diffstat (limited to 'formatter/__init__.py')
-rw-r--r-- | formatter/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/formatter/__init__.py b/formatter/__init__.py index 57a836d..0642a40 100644 --- a/formatter/__init__.py +++ b/formatter/__init__.py @@ -70,7 +70,10 @@ def __format_stats_difference(old_user_stats: UserStats, new_user_stats: UserSta separator='\n') def __format_stat_difference(old_stat_value: int, new_stat_value: int): - difference = max(new_stat_value, new_stat_value - old_stat_value) + if old_stat_value > new_stat_value: + difference = new_stat_value + else: + difference = max(0, new_stat_value - old_stat_value) if difference > 0: return " \(\+ {}\)".format(str(difference)) else: |