zarocknz/javascript-winwheel

how to adjust the luck statistic

Opened this issue · 1 comments

Hi,how can I adjust the chances of episodes on the wheel? for example, if Box A comes out with a 99% probability, box b comes out with a 1% probability

Hello.

Please take a look at this tutorial http://dougtesting.net/winwheel/docs/tut14_setting_the_prize

How exactly you would like to figure out the probability is up to you. Do you want it truly random? maybe you want to assign prizes from a pool in the database and once won the prize is no longer available?? there are many options.

One simple way would be to pick a random number between 1 and 100. If its 1-99 then its box A, if 100 then box B like discussed near the start of this article https://www.mathsisfun.com/percentage.html

Might be better ways to do it if you want a purely mathematical solution. Google is your friend in this case :)