A console-based casino game ("Crash") inspired by popular online casinos such as Bustabit and Roobet.
- Compile Game
- Run it
- Enter your Starting Balance
- Enter your bet amount (<= balance)
- Enter an automatic cashout level above 1.00, or type 0/press enter to disable automatic cashout for this round
- Wait for the game start
- Press enter to cashout immediately. If you set an automatic cashout level, it will cashout at that point.
- If the rocket crashes before you cashout, you lose your initial bet. If it doesn't, you increase your bet by the multiplier at which you cashed out.
[Note: While Bustabit and Roobet use verifiable hashes based on SHA256 cryptography, RocketCasino emulates the results using a simple RNG.]
- A number between 0 and 100 is generated. If it is 0, 1, or 2, the 'rocket' crashes immediately (1.0 is returned as the crashpoint).
- A new number ("x") between 0 and 1000 is generated. It is divided by 1000 to obtain a double-value between 0 and 1.
- 99 is divided by 1-x
- x is floored
- x is again divided by 100. If the number is less than 1, 1 is used by default