A simple juttle to test the dice_rolls subgraph
Created
December 7, 2014 21:10
-
-
Save mccanne/23b9b5e8fca59e596d66 to your computer and use it in GitHub Desktop.
Dice test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub dice_rolls(n) { | |
function roll() { | |
return Math.ceil(6 * Math.random()); | |
} | |
function toss_dice() { | |
return roll() + roll(); | |
} | |
emitter -limit n -start 0 | put throw = toss_dice() | |
} | |
dice_rolls -n 10 | @table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment