Skip to content

Instantly share code, notes, and snippets.

@4mitch
Created May 13, 2019 22:29
Show Gist options
  • Save 4mitch/a8ceaed6b590cc3dee307757770faa86 to your computer and use it in GitHub Desktop.
Save 4mitch/a8ceaed6b590cc3dee307757770faa86 to your computer and use it in GitHub Desktop.
1 shot to 10 values target and then roll the dice as many as shot
(let [q 6
n 10]
(/ (* q
(- 1
(js/Math.pow q n)))
(- 1 q)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment