Skip to content

Commit 85a72b4

Browse files
committed
Fix tournaments
1 parent 87ae8e8 commit 85a72b4

File tree

8 files changed

+4
-289
lines changed

8 files changed

+4
-289
lines changed

services/app/apps/codebattle/lib/codebattle/tournament/strategy/team.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ defmodule Codebattle.Tournament.Team do
8181
|> Map.values()
8282
|> shift_pairs(tournament.current_round)
8383
|> Enum.zip()
84+
|> Enum.map(fn {p1, p2} -> [p1,p2] end)
8485

8586
{tournament, player_pairs}
8687
end

services/app/apps/codebattle/lib/codebattle_web/live/components/tournament/create_form.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ defmodule CodebattleWeb.Live.Tournament.CreateFormComponent do
188188
<div class="d-flex flex-column flex-md-row flex-lg-row flex-xl-row">
189189
<div class="d-flex flex-column justify-content-between w-auto">
190190
<%= label(f, :players_limit) %>
191-
<%= select(f, :players_limit, [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048],
191+
<%= select(f, :players_limit, [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384],
192192
value: f.params["players_limit"] || 64,
193193
class: "custom-select"
194194
) %>

services/app/apps/codebattle/lib/codebattle_web/live/components/tournament/edit_form.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ defmodule CodebattleWeb.Live.Tournament.EditFormComponent do
125125
<div class="d-flex flex-column flex-md-row flex-lg-row flex-xl-row">
126126
<div class="d-flex flex-column justify-content-between w-auto">
127127
<%= label(f, :players_limit) %>
128-
<%= select(f, :players_limit, [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048],
128+
<%= select(f, :players_limit, [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384],
129129
class: "custom-select"
130130
) %>
131131
<%= error_tag(f, :players_limit) %>

services/app/apps/codebattle/test/codebattle_web/channels/game_channel_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ defmodule CodebattleWeb.GameChannelTest do
2525
{:ok, game} =
2626
Game.Context.create_game(%{state: "waiting_opponent", players: [user1], level: "easy"})
2727

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

3030
assert created.task.level == "easy"
3131
assert created.mode == "standard"

services/app/apps/codebattle/test/codebattle_web/live/tournament/chat_test.exs

Lines changed: 0 additions & 51 deletions
This file was deleted.

services/app/apps/codebattle/test/codebattle_web/live/tournament/index_test.exs

Lines changed: 0 additions & 77 deletions
This file was deleted.

services/app/apps/codebattle/test/codebattle_web/live/tournament/individual_test.exs

Lines changed: 0 additions & 77 deletions
This file was deleted.

services/app/apps/codebattle/test/codebattle_web/live/tournament/team_test.exs

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)