Created
August 13, 2011 01:09
-
-
Save alexgodin/1143352 to your computer and use it in GitHub Desktop.
dice roll
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
def roll_dice(number_of_dice) | |
number_of_dice.times {p roll_die} | |
end | |
def roll_die | |
r = Random.new | |
r.rand(1..6) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment