1. possible bug in rand_range function
- Posted by tiger0581 Dec 26, 2009
- 1124 views
I've just created my first real simple game in Euphoria. In the process, I may have found a bug in the rand_range function. When I first start playing the game, it picks random numbers like I expect. At a certain point, it just starts picking the number 1 for the wrest of the game. Is this a bug or am I missing something? The source code for the game is at http://ormondbeachishome.com/killthelobbiests.ex.
2. Re: possible bug in rand_range function
- Posted by ChrisB (moderator) Dec 26, 2009
- 1069 views
I've just created my first real simple game in Euphoria. In the process, I may have found a bug in the rand_range function. When I first start playing the game, it picks random numbers like I expect. At a certain point, it just starts picking the number 1 for the wrest of the game. Is this a bug or am I missing something? The source code for the game is at http://ormondbeachishome.com/killthelobbiests.ex.
Hi
Having a very quick scan through the code, isn't this what's supposed to happen - as you reduce the hitmen count, so the range fro random numbers becomes les, until you pick between the range 1 and 1?
Chris
3. Re: possible bug in rand_range function
- Posted by tiger0581 Dec 26, 2009
- 1021 views
Oh my god! I feel stupid. Thanks.
4. Re: possible bug in rand_range function
- Posted by ChrisB (moderator) Dec 27, 2009
- 989 views
Heh, thats ok, I've done that so many times I've lost count - 1
Chris