hanyuone / Ways-to-NOT-make-money

A basic Python (2.x/3.x) incremental game.
8 stars 3 forks source link

Update to v0.6.4alpha1 (Randomness Update) #59

Closed ghost closed 8 years ago

ghost commented 8 years ago

This release adds a new function which adds or deducts from your money randomly.

TODO:

hanyuone commented 8 years ago

What does this lotto thing do?

Also, we seriously don't need the issue reporting thing, just saying.

ghost commented 8 years ago

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

ghost commented 8 years ago

Merging.

hanyuone commented 8 years ago

But we don't need it...

hanyuone commented 8 years ago

What does the Lotto thing do? I might implement it into the future branch (which could be implemented into main).

ghost commented 8 years ago

Okay..... reverting?

hanyuone commented 8 years ago

What? No, I just want to ask what the Lotto thing does, and how it works and stuff. I might implement it.

ghost commented 8 years ago

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...
ghost commented 8 years ago

oh check this out

https://github.com/qlstudio/MyVirtualCity

hanyuone commented 8 years ago

What does uniform() do?

And change the penalty to halving the money instead of changing it to $1000.

ghost commented 8 years ago

Nearly same as random() just random decimal selection in range [1.1, 5.1)

ghost commented 8 years ago

didit... 2 more days

hanyuone commented 8 years ago

Did what?

ghost commented 8 years ago

PR

ghost commented 8 years ago

Now?