But now, I don't understand why you're dividing "97" by this number :
crash = Math.floor(97 / crash);
I'm sorry for these questions but I'm trying to understand how that works.
TYVM RHavar
So the first thing to note is that a final outcome of 123 means a multiplier of 1.23x. So `123 / crash` is easier to reason about if you think of it more like `1.23/crash` in maths terms. And as we already discussed, `crash` is evenly distributed between 0 and 1. So if you wanted to simply turn it into a multiplier you'd do: `100 / crash` ... but no casino is going to do that, as they need a house edge for themselves. I know bustabit effectively uses `99 / crash` to make a house edge of 1%, but rocketpot is using `97 / crash` which is going to result in a significantly higher edge (of which some will be used to fund the bonuses/jackpots/other benefit thats bustabit might not have).
You should have added the part on the house edge in the comments of your code IMHO, in order to allow people to easily compare the house edge between the different crash games "clones"