Skip to content

Commit

Permalink
Call Lexon's function to determine game type
Browse files Browse the repository at this point in the history
  • Loading branch information
jauggy committed Jun 9, 2024
1 parent efd0fd5 commit c7515ac
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions lib/teiserver/lobby/libs/lobby_restrictions.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Teiserver.Lobby.LobbyRestrictions do
"""
alias Teiserver.{CacheUser, Config}
require Logger
alias Teiserver.Battle.BalanceLib
alias Teiserver.Battle.{BalanceLib, MatchLib}
alias Teiserver.Battle

@rank_upper_bound 1000
Expand Down Expand Up @@ -162,15 +162,7 @@ defmodule Teiserver.Lobby.LobbyRestrictions do
team_size = state.host_teamsize
team_count = state.host_teamcount

# TODO Change this when Lexon does split Team to Big/Small Teams
# Can see if we can reuse a function elsewhere
rating_type =
cond do
team_count > 2 && team_size == 1 -> "FFA"
team_count > 2 && team_size > 1 -> "Team FFA"
team_size == 1 -> "Duel"
true -> "Team"
end
rating_type = MatchLib.game_type(team_size, team_count)

{player_rating, _player_uncertainty} =
BalanceLib.get_user_rating_value_uncertainty_pair(user_id, rating_type)
Expand Down

0 comments on commit c7515ac

Please sign in to comment.