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 f2b76e7 commit 158cd00
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
6 changes: 4 additions & 2 deletions lib/teiserver/battle/libs/match_lib.ex
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ defmodule Teiserver.Battle.MatchLib do
String.contains?(bot_names, "Raptor") -> "Raptors"
Enum.empty?(bots) == false -> "Bots"
team_count == 2 and team_size == 1 -> "Duel"
team_count == 2 and team_size <= 5 -> "Small Team" # 2v2, 3v3, 4v4, 5v5
team_count == 2 and team_size > 5 -> "Big Team" # 6v6, 7v7, 8v8
# 2v2, 3v3, 4v4, 5v5
team_count == 2 and team_size <= 5 -> "Small Team"
# 6v6, 7v7, 8v8
team_count == 2 and team_size > 5 -> "Big Team"
team_size == 1 -> "FFA"
true -> "Team FFA"
end
Expand Down
7 changes: 4 additions & 3 deletions lib/teiserver_web/controllers/report/rating_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ defmodule TeiserverWeb.Report.RatingController do
action: {Phoenix.Controller, :action_name},
user: {Teiserver.Account.AuthLib, :current_user}

plug(:add_breadcrumb, name: 'Reports', url: '/teiserver/reports')
plug(:add_breadcrumb, name: 'Reports', url: '/teiserver/reports/ratings')
plug(:add_breadcrumb, name: ~c"Reports", url: ~c"/teiserver/reports")
plug(:add_breadcrumb, name: ~c"Reports", url: ~c"/teiserver/reports/ratings")

@spec distribution_table(Plug.Conn.t(), map) :: Plug.Conn.t()
def distribution_table(conn, _params) do
Expand Down Expand Up @@ -55,7 +55,8 @@ defmodule TeiserverWeb.Report.RatingController do
rating_type =
cond do
Enum.count(player_ids) == 2 -> "Duel"
true -> "Big Team" # Should probably get rating based on team size instad
# Should probably get rating based on team size instad
true -> "Big Team"
end

rating_lookup =
Expand Down
2 changes: 1 addition & 1 deletion test/teiserver/coordinator/memes_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ defmodule Teiserver.Coordinator.MemesTest do

assert reply == %{
"cmd" => "s.lobby.update_values",
"lobby_id" => lobby_id,
"lobby_id" => lobby_id,
"new_values" => %{
"disabled_units" =>
~w(armaap armalab armap armavp armhp armshltx armvp armamsub armasy armfhp armplat armshltxuw armsy armmg armllt armbeamer armhlt arm armdrag armclaw armguard armjuno armham armjeth armpw armrectr armrock armwar coraap coralab corap coravp corgant corhp corlab corvp corllt corfhp corsy corjuno corhllt corhlt)
Expand Down
24 changes: 21 additions & 3 deletions test/teiserver_web/live/microblog/blog/index_live_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,33 @@ defmodule TeiserverWeb.Microblog.Blog.IndexLiveTest do
tag2 = tag_fixture()
tag3 = tag_fixture()

post1 = post_fixture(title: "Post 1 title", summary: "Post 1 line1", contents: "Post 1 line1\n\nPost 1 fold line")
post1 =
post_fixture(
title: "Post 1 title",
summary: "Post 1 line1",
contents: "Post 1 line1\n\nPost 1 fold line"
)

_post1_tag1 = post_tag_fixture(post_id: post1.id, tag_id: tag1.id)
_post1_tag2 = post_tag_fixture(post_id: post1.id, tag_id: tag2.id)

post2 = post_fixture(title: "Post 2 title", summary: "Post 2 line1", contents: "Post 2 line1\n\nPost 2 fold line")
post2 =
post_fixture(
title: "Post 2 title",
summary: "Post 2 line1",
contents: "Post 2 line1\n\nPost 2 fold line"
)

_post2_tag1 = post_tag_fixture(post_id: post2.id, tag_id: tag1.id)
_post2_tag3 = post_tag_fixture(post_id: post2.id, tag_id: tag3.id)

post3 = post_fixture(title: "Post 3 title", summary: "Post 3 line1", contents: "Post 3 line1\n\nPost 3 fold line")
post3 =
post_fixture(
title: "Post 3 title",
summary: "Post 3 line1",
contents: "Post 3 line1\n\nPost 3 fold line"
)

_post3_tag2 = post_tag_fixture(post_id: post3.id, tag_id: tag2.id)
_post3_tag3 = post_tag_fixture(post_id: post3.id, tag_id: tag3.id)

Expand Down

0 comments on commit 158cd00

Please sign in to comment.