From 30f3a0e84ed55b2e7596a5d3c6a687ea787b8721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sta=C5=84czak-Marikin?= Date: Tue, 11 Jun 2024 07:03:21 +0200 Subject: [PATCH] Use Enum.count instead of count for team_count/size --- lib/teiserver/battle/libs/match_lib.ex | 4 ++-- lib/teiserver/game/libs/match_rating_lib.ex | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/teiserver/battle/libs/match_lib.ex b/lib/teiserver/battle/libs/match_lib.ex index f88f19f60..be2b14d40 100644 --- a/lib/teiserver/battle/libs/match_lib.ex +++ b/lib/teiserver/battle/libs/match_lib.ex @@ -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) diff --git a/lib/teiserver/game/libs/match_rating_lib.ex b/lib/teiserver/game/libs/match_rating_lib.ex index 91211fc8e..cec760546 100644 --- a/lib/teiserver/game/libs/match_rating_lib.ex +++ b/lib/teiserver/game/libs/match_rating_lib.ex @@ -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()]