Closed ghost closed 8 years ago
What does this lotto thing do?
Also, we seriously don't need the issue reporting thing, just saying.
Fine... do you really want to delete the issue reporting thing? Maybe you can ignore it, but some users might find it useful.
Merging in 1 day
Merging.
But we don't need it...
What does the Lotto thing do? I might implement it into the future
branch (which could be implemented into main
).
Okay..... reverting?
What? No, I just want to ask what the Lotto thing does, and how it works and stuff. I might implement it.
It's just like earn or lose a certain amount of money under a probability (losing money is more common....)
hopefully you can figure the probs:
money -= lottoprice
lottoprice *= uniform(1.1, 5.1)
prob = random()
if prob < (1/3.0): # 1/3 probability
money += 50.0
elif prob < (1/3.0 + 1/5.0): # 1/5 prob
money += 120.0
elif prob < (1/3.0 + 1/5.0 + 1/7.0): # 1/7 prob
money += 200.0
elif prob < (1/3.0 + 1/5.0 + 1/7.0 + 1/9.0): # 1/9 prob
money += 260.0
elif prob < (1/3.0 + 1/5.0 + 1/7.0 + 1/9.0 + 1/11.0): # 1/11 prob
money += 500.0
elif prob < (1/3.0 + 1/5.0 + 1/7.0 + 1/9.0 + 1/11.0 + 1/13.0): # 1/13 prob
money += 600.0
elif prob < (1/3.0 + 1/5.0 + 1/7.0 + 1/9.0 + 1/11.0 + 1/13.0 + 1/1013.0): # 1/1013 prob
money += 50000.0
elif prob < (1/3.0 + 1/5.0 + 1/7.0 + 1/9.0 + 1/11.0 + 1/13.0 + 1/1013.0 + 1/2013.0): # 1/2013 prob
money += 250000.0
elif prob < (1/3.0 + 1/5.0 + 1/7.0 + 1/9.0 + 1/11.0 + 1/13.0 + 1/1013.0 + 1/2013.0 + 1/3013.0): # 1/3013 prob
money += 153250000.0
else:
money = 1000.0 # hee hee hee...
oh check this out
What does uniform()
do?
And change the penalty to halving the money instead of changing it to $1000.
Nearly same as random() just random decimal selection in range [1.1, 5.1)
didit... 2 more days
Did what?
PR
Now?
This release adds a new function which adds or deducts from your money randomly.
TODO: