From a7ab4523defb6da47719e3bb8cb9d89add076b5e Mon Sep 17 00:00:00 2001 From: Outrun Colors Date: Mon, 12 Sep 2022 22:14:55 -0500 Subject: [PATCH] Skip winners on 0 and 00 --- files/helpers/roulette.py | 9 +++++++-- files/templates/chat.html | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/files/helpers/roulette.py b/files/helpers/roulette.py index e4778cc0a..d0df66392 100644 --- a/files/helpers/roulette.py +++ b/files/helpers/roulette.py @@ -157,8 +157,13 @@ def spin_roulette_wheel(): if len(participants) > 0: number = randint(0, 37) # 37 is 00 - winners, payouts, rewards_by_game_id = determine_roulette_winners( - number, bets) + + if number > 0 and number < 37: # 0 and 00 do not pay anything + winners, payouts, rewards_by_game_id = determine_roulette_winners(number, bets) + else: + winners = [] + payouts = {} + rewards_by_game_id = {} # Pay out to the winners and send a notification. for user_id in winners: diff --git a/files/templates/chat.html b/files/templates/chat.html index e49480b9a..5d0c7e223 100644 --- a/files/templates/chat.html +++ b/files/templates/chat.html @@ -129,6 +129,8 @@ 0 + + {% include "casino/roulette_screen.html" %}