Skip to content

Instantly share code, notes, and snippets.

@denstark
Created July 9, 2012 22:40
Show Gist options
  • Save denstark/fa189e5de7d65a700a36 to your computer and use it in GitHub Desktop.
Save denstark/fa189e5de7d65a700a36 to your computer and use it in GitHub Desktop.
class DiceSet
@diceset = Array.new
def initialize(num=1)
(1..num).each do |i|
addRoll
end
end
def addRoll
@diceset << rand(1..6)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment