Skip to content

Commit

Permalink
mix format
Browse files Browse the repository at this point in the history
  • Loading branch information
L-e-x-o-n committed Jun 9, 2024
1 parent d084633 commit c176bfb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
7 changes: 5 additions & 2 deletions lib/teiserver/battle/libs/match_lib.ex
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,12 @@ defmodule Teiserver.Battle.MatchLib do

if teams != %{} do
team_count = teams |> count
team_size = teams
|> Enum.map(fn {_, t} -> (t |> count) end)

team_size =
teams
|> Enum.map(fn {_, t} -> t |> count end)
|> Enum.max(fn -> 0 end)

game_type = game_type(team_size, team_count, bots)

match = %{
Expand Down
3 changes: 2 additions & 1 deletion lib/teiserver/game/servers/balancer_server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ defmodule Teiserver.Game.BalancerServer do
players
|> Enum.group_by(fn c -> c.team_number end)

team_size = teams
team_size =
teams
|> Enum.map(fn {_, t} -> Enum.count(t) end)
|> Enum.max(fn -> 0 end)

Expand Down
4 changes: 1 addition & 3 deletions lib/teiserver/libs/teiserver_configs.ex
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,12 @@ defmodule Teiserver.TeiserverConfigs do
default: 50
})


add_site_config_type(%{
key: "lobby.Small team game limit",
section: "Lobbies",
type: "integer",
permissions: ["Admin"],
description:
"Maximum team size to be considered as a small team game",
description: "Maximum team size to be considered as a small team game",
default: 5
})
end
Expand Down

0 comments on commit c176bfb

Please sign in to comment.