Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Remove special treatment for multiplier < 5
Browse files Browse the repository at this point in the history
Signed-off-by: Đinh Hoàng Việt <[email protected]>
  • Loading branch information
M-DinhHoangViet authored Jan 6, 2024
1 parent 288741a commit 8a96334
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions opponents.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,9 @@ def add_timeout(self, success: bool, game_duration: timedelta, matchmaking_type:
elif not success:
opponent_data.multiplier += 1

opponent_multiplier = opponent_data.multiplier if opponent_data.multiplier >= 5 else 1
duration_ratio = game_duration / matchmaking_type.estimated_game_duration
timeout = duration_ratio * matchmaking_type.estimated_game_duration + self.delay
timeout *= matchmaking_type.multiplier * opponent_multiplier
timeout *= matchmaking_type.multiplier * opponent_data.multiplier

if opponent_data.release_time > datetime.now():
opponent_data.release_time += timeout
Expand Down

0 comments on commit 8a96334

Please sign in to comment.