From: Semih Ozkoseoglu Date: 2009-09-26T07:16:16+09:00 Subject: Re: Roulette & rand >One problem that I can see is that you're allowing your random betting >strategy to pick 0, rather than red or black, which I don't think is >your intention. > >Change > >> number_02 = rand(37) >> color_02 = colors[number_02] > >to > >color_02 = [:red, :black][rand(2)] > >maybe? Hi Paul, I'll have a look at this issue sometime today and will write an update if it changes anything. Thank you. And Josh, > Hi, it is giving me the output that I would expect, here is a image > showing > how I calculated it, and I ran the program 3 times with results very > similar > to what I calculated they should be. > http://img132.imageshack.us/img132/8939/roulette.png I get the exact same results with you but what I dont understand is why you think that the results are normal. I dont understand why it looses twice as much when you bet randomly (if its not the problem Paul mentioned above). It would be great if you can tell me how you calculated what the results should be. Thanks. Semih -- Posted via http://www.ruby-forum.com/.