Discussion forum > Suggestions
Fix the Lottery
tiggy26668:
--- Quote from: 2crzy4uall on July 22, 2012, 07:38:40 pm ---
--- Quote from: optical on July 22, 2012, 01:38:43 pm ---For this type of number generation it is adequate.
--- End quote ---
Really this is where it should end, its an in game lottery for fake money, we don't need a top notch number generator.
--- End quote ---
2crazy4uall, using decimal/floating point numbers for index generation opens the possibility to skip indexes and give others higher/lower probabilities. that means people would be paying for a ticket that can't win. yes if someone buys 99 tickets and u have 1 u have 1/100 chance to win but with float values being used u could potentially have a 0/99 chance to win.
☣2crzy4uall☣:
Our argument is, does it really matter? I don't base all my gameplay off this lottery, I have no qualms with having a 0/99 chance. I bought 1100 tix the first round and lost, its just not a big deal
iGenerator:
Optical has stated twice in this thread how it works, can it be locked?
optical:
Tiggy, please read my post - your rant is once again completely irrelevant as I stated. I linked the exact method being used.
http://docs.oracle.com/javase/1.4.2/docs/api/java/util/Random.html#nextInt(int)
That is the method being used to generate the numbers. Once again, it is random enough for this kind of simulation. The only time these forms of generators are not adequate is when a large slew of numbers of generated and assumed to be entirely uniform, such as in experimental data - or in cryptography, and even then the bias is generally quite small.
Navigation
[0] Message Index
[*] Previous page
Go to full version