Skip to content

Instantly share code, notes, and snippets.

@andrewhl
Forked from rickhull/diceroll.rb
Created October 11, 2011 20:36
Embed
What would you like to do?
Ruby Koan
module DiceSet
def self.roll(num)
Array.new(num) { 1 + rand(6) }
end
end
DiceSet.roll(20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment