Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

about_dice_project done

  • Loading branch information...
commit fd0cef36e991f859223b1a235b8922f75344fa20 1 parent 856d5cd
@freiwillen authored
Showing with 12 additions and 3 deletions.
  1. +1 −1  .path_progress
  2. +11 −2 about_dice_project.rb
View
2  .path_progress
@@ -1 +1 @@
-0,0,1,2,4,5,6,6,7,8,8,11,16,14,14,14,16,17,18,18,19,19,19,23,24,24,25,26,26,27,28,32,33,35,35,36,37,40,41,44,50,50,50,50,51,53,54,55,56,60,60,61,63,63,64,64,65,65,65,66,67,71,71,73,76,79,80,84,84,84,85,87,88,89,90,95,96,98,98,98,99,99,103,104,105,106,107,108,109,111,114,114,118,122,125,131,132,135,138,138,141,142,142,143,144,146,149,150,150,153,153,153,153,154,154,155,156,157,158,159,160,164,166,166,168,175,175,177,178,178,178,179,180,181,182,182,183,182,182,189,190,191,192,204,205,205,205,205,205,205,205,206,206,209
+0,0,1,2,4,5,6,6,7,8,8,11,16,14,14,14,16,17,18,18,19,19,19,23,24,24,25,26,26,27,28,32,33,35,35,36,37,40,41,44,50,50,50,50,51,53,54,55,56,60,60,61,63,63,64,64,65,65,65,66,67,71,71,73,76,79,80,84,84,84,85,87,88,89,90,95,96,98,98,98,99,99,103,104,105,106,107,108,109,111,114,114,118,122,125,131,132,135,138,138,141,142,142,143,144,146,149,150,150,153,153,153,153,154,154,155,156,157,158,159,160,164,166,166,168,175,175,177,178,178,178,179,180,181,182,182,183,182,182,189,190,191,192,204,205,205,205,205,205,205,205,206,206,209,210,210,212,212,214
View
13 about_dice_project.rb
@@ -2,9 +2,18 @@
# Implement a DiceSet Class here:
#
-# class DiceSet
+class DiceSet
# code ...
-# end
+ attr_accessor :values
+ def initialize
+ @values = []
+ end
+
+ def roll n
+ @values = []
+ n.times {|i| @values << rand(5) + 1}
+ end
+end
class AboutDiceProject < EdgeCase::Koan
def test_can_create_a_dice_set
Please sign in to comment.
Something went wrong with that request. Please try again.