Python Forum
Trouble with simple roulette game
Thread Rating:
  • 2 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trouble with simple roulette game
#1
Here is my extremely simple code for a roulette game I've made using IDLE. I'm fairly new to Python and can't quite figure out why this isn't working. There is no error, but the problem is being able to win. Even if you do roll a red number while betting on red, it will subtract from your balance. Winning on green works, but black and red do not. Losing works just fine. As an example, say I bet 1000 tokens on 1 (or red). I roll a number from the black list, and lose 1000 tokens. I bet 1000 tokens on red again and this time roll a 7, which is a red number. I now have 3000 tokens instead of the 5000 tokens I should have. I feel like my code should work perfectly fine and don't really understand why it doesn't.
Reply


Messages In This Thread
Trouble with simple roulette game - by chadandersen1 - Oct-19-2017, 03:49 AM
RE: Trouble with simple roulette game - by Mekire - Oct-19-2017, 08:10 AM
RE: Trouble with simple roulette game - by Mekire - Oct-20-2017, 12:15 AM
RE: Trouble with simple roulette game - by Mekire - Oct-20-2017, 11:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Simple cards game blackpanda 3 4,385 Apr-10-2020, 08:46 PM
Last Post: TomToad
  Need help with simple guessing game! ghost0fkarma 2 2,933 Nov-03-2018, 01:19 AM
Last Post: ghost0fkarma
  Easy equipment system for simple game and problems with it naisyrk 3 3,443 Sep-01-2018, 10:05 AM
Last Post: Gribouillis
  Errors in simple text adventure game? ecloev 5 5,170 Apr-10-2018, 05:55 PM
Last Post: nilamo
  Simple Hangman Game Issue andrew95 2 4,517 Apr-02-2018, 02:24 PM
Last Post: andrew95

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020