Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
vtm9 committed Nov 24, 2023
1 parent 85a72b4 commit c4da67c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ defmodule Codebattle.Tournament.Team do
|> Map.values()
|> shift_pairs(tournament.current_round)
|> Enum.zip()
|> Enum.map(fn {p1, p2} -> [p1,p2] end)
|> Enum.map(fn {p1, p2} -> [p1, p2] end)

{tournament, player_pairs}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ defmodule CodebattleWeb.Live.Tournament.CreateFormComponent do
<div class="d-flex flex-column flex-md-row flex-lg-row flex-xl-row">
<div class="d-flex flex-column justify-content-between w-auto">
<%= label(f, :players_limit) %>
<%= select(f, :players_limit, [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384],
<%= select(
f,
:players_limit,
[2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384],
value: f.params["players_limit"] || 64,
class: "custom-select"
) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ defmodule CodebattleWeb.Live.Tournament.EditFormComponent do
<div class="d-flex flex-column flex-md-row flex-lg-row flex-xl-row">
<div class="d-flex flex-column justify-content-between w-auto">
<%= label(f, :players_limit) %>
<%= select(f, :players_limit, [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384],
<%= select(
f,
:players_limit,
[2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384],
class: "custom-select"
) %>
<%= error_tag(f, :players_limit) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ defmodule CodebattleWeb.GameChannelTest do
{:ok, game} =
Game.Context.create_game(%{state: "waiting_opponent", players: [user1], level: "easy"})

{:ok, %{game: created}, _socket1} = subscribe_and_join(socket1, GameChannel, game_topic(game))
{:ok, %{game: created}, _socket1} =
subscribe_and_join(socket1, GameChannel, game_topic(game))

assert created.task.level == "easy"
assert created.mode == "standard"
Expand Down

0 comments on commit c4da67c

Please sign in to comment.