Skip to content

Commit

Permalink
Merge pull request #45 from rkh00/patch-7
Browse files Browse the repository at this point in the history
Fixed math in coinflip()
  • Loading branch information
LBlend authored Sep 24, 2024
2 parents d7eef17 + a03ea4b commit fddf072
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cogs/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@ async def coinflip(self, interaction: discord.Interaction):
"""

random_result = random.randint(1, 100) # We use 1 and not 0 to avoid a tie
if random_result >= 50: # And by including 50 we avoid that tie
if random_result > 50: # And by including 50 we avoid that tie
outcome = "Kron"
elif random_result < 50:
elif random_result <= 50:
outcome = "Mynt"

await interaction.response.send_message(outcome)
Expand Down

0 comments on commit fddf072

Please sign in to comment.