Skip to content

Commit

Permalink
Use Enum.count instead of count for team_count/size
Browse files Browse the repository at this point in the history
  • Loading branch information
StanczakDominik committed Jun 11, 2024
1 parent 0104ef7 commit 30f3a0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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

0 comments on commit 30f3a0e

Please sign in to comment.