# Source code for Dice class. class Dice # Initialize dice by giving them random values. def initialize roll end # Roll dice to give them new random values. def roll @die1 = 1 + rand(6) @die2 = 1 + rand(6) end # Show current values of dice. def show_dice print "Die1: ", @die1, " Die2:", @die2 end # Show current sum of dice. def show_sum print "Sum of dice is ", @die1 + @die2, ".\n" end end