Skip to content

Instantly share code, notes, and snippets.

@qpwo
Created June 29, 2018 00:19
Show Gist options
  • Select an option

  • Save qpwo/52c2e8d0a6a78c7d437c2ae247560c2b to your computer and use it in GitHub Desktop.

Select an option

Save qpwo/52c2e8d0a6a78c7d437c2ae247560c2b to your computer and use it in GitHub Desktop.
100 runs of the casino game where you double or half your money on a coin flip
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Joahi93
Copy link

Joahi93 commented Dec 15, 2025

cool mini-simulation: after 100 runs you can really see how fast the coin wipes out the bankroll with doubling. I’d add median output and share of bankruptcies, not just the final sum. when I was checking the logic with real live games, I looked up the funky time multipliers at funkytimelive.com, checked how the mega wheel segments work at megawheelgame.com, and figured out the bonus rounds in sweet bonanza live at sweetbonanzalive.org—that’s when it became clear that the plain coin is the harshest model here. anyway, the code is easy to read, thanks for the clarity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment