Skip to content

Instantly share code, notes, and snippets.

@hotyes
hotyes / dice.js
Last active August 30, 2024 10:10
dice
function random(min, max) { // min and max included
return Math.random() * (max - min + 1) + min;
}
const bet = 1
const rtp = 0.99
const max = 100
function roll(threshold, under) {
const dice = random(0, max)