Skip to content

Commit

Permalink
Party command adds player if blind test is running
Browse files Browse the repository at this point in the history
  • Loading branch information
papey committed Jun 16, 2021
1 parent c59e76e commit 50a2407
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/blindtest/party.ex
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ defmodule Party do
end

def add_player(pid) do
if BlindTest.process() != :none do
Game.add_player(pid)
end

Agent.update(__MODULE__, fn party ->
%{party | players: MapSet.put(party.players, pid)}
end)
Expand Down

0 comments on commit 50a2407

Please sign in to comment.