Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Enum.count instead of count for team_count/size #324

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/teiserver/battle/libs/match_lib.ex
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ defmodule Teiserver.Battle.MatchLib do
|> Enum.group_by(fn c -> c.team_number end)

if teams != %{} do
team_count = teams |> count
team_count = teams |> Enum.count()

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

game_type = game_type(team_size, team_count, bots)
Expand Down
1 change: 1 addition & 0 deletions lib/teiserver/game/libs/match_rating_lib.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ defmodule Teiserver.Game.MatchRatingLib do
"Team FFA",
"Partied Team"
]

# TODO Remove "Team" from here once the split is done

@spec rating_type_list() :: [String.t()]
Expand Down
Loading