Skip to content

Commit

Permalink
fix: wheel probabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
joaodiaslobo committed Nov 5, 2023
1 parent 30de570 commit 2166933
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/safira/roulette/roulette.ex
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ defmodule Safira.Roulette do
prize = spin_prize()
attendee_prize = get_keys_attendee_prize(attendee.id, prize.id)

# Check if the attendee has already received the maximum amount of this prize, and if so, spin again
# Check if the attendee has already received the maximum amount of this prize, and if so, count it as a loss and give them no prize

Check warning on line 298 in lib/safira/roulette/roulette.ex

View workflow job for this annotation

GitHub Actions / OTP 25.x / Elixir 1.14.x

Line is too long (max is 120, was 135).
case attendee_prize do
nil ->
prize
Expand All @@ -304,7 +304,7 @@ defmodule Safira.Roulette do
if attendee_prize.quantity + 1 <= prize.max_amount_per_attendee do
prize
else
find_valid_prize(attendee)
Repo.one(from p in Prize, where: p.name == "Nada")
end
end
end
Expand Down

0 comments on commit 2166933

Please sign in to comment.