Closed jauggy closed 4 months ago
After calling BalanceLib.create_balance there is a map returned. This map has key team_groups
BalanceLib.create_balance
team_groups
This will look like
assert result.team_groups == %{ 1 => [ %{count: 1, group_rating: 6, members: ["Noob2"], ratings: [6]}, %{count: 1, group_rating: 8, members: ["Pro1"], ratings: [8]} ], 2 => [ %{count: 1, group_rating: 5, members: ["Noob1"], ratings: [5]}, %{count: 1, group_rating: 17, members: ["Noob3"], ratings: [17]} ] }
If count is greater than 1 then we have parties
I think we can enumerate as follows:
Enum.each(%{a: 1, b: 2, c: 3}, fn {k, v} -> IO.puts("#{k} --> #{v}") end)
After calling
BalanceLib.create_balance
there is a map returned. This map has keyteam_groups
This will look like
If count is greater than 1 then we have parties