Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
K-ETFreeman committed Jan 2, 2025
1 parent 515125d commit 1b6a3b6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions server/ladder_service/ladder_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ async def launch_match(
and our X equation would have lower border of X ofcourse
T = (B + 2C + XD) / (D + B + C + A - M)
now lets prove that T > X:
lets assume that T < X
lets assume that T < X
(B + 2C + XD) / (D + B + C + A - M) < X
B + 2C + XD < XD + XB + XC + XA - XM
B + 2C < XB + XC + XA - XM
Expand All @@ -801,7 +801,7 @@ async def launch_match(
1) sorting tokens applied in ascending order
cycle:
2) including next bunch of maps (with the same tokens applied value) to our group
3) checking if tokens_sum == 0
3) checking if tokens_sum == 0
then its case 1, and return 1 if maps_balance > 0
4) otherwise
solving equation for current group
Expand All @@ -811,7 +811,7 @@ async def launch_match(
def calculate_dynamic_tokens_per_map(self, M: float, tokens: Iterable[int]) -> float:
sorted_tokens = sorted(tokens)
# adding infinity as last upper border
sorted_tokens.append(float('inf'))
sorted_tokens.append(float("inf"))
# t is the maximum amount of tokens applied to any single map in current group
t = 0
tokens_sum = 0
Expand Down
2 changes: 1 addition & 1 deletion server/matchmaker/map_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ class MatchmakerQueueMapPool(NamedTuple):
max_rating: int | None
veto_tokens_per_player: int
max_tokens_per_map: int
minimum_maps_after_veto: float
minimum_maps_after_veto: float
2 changes: 1 addition & 1 deletion server/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class MatchmakerQueueMapPoolVetoData(NamedTuple):
map_pool_map_version_ids: list[int]
veto_tokens_per_player: int
max_tokens_per_map: int
minimum_maps_after_veto: float
minimum_maps_after_veto: float


class MapPoolMap(Protocol):
Expand Down

0 comments on commit 1b6a3b6

Please sign in to comment.