From a492902b196c5c6160a0ff76b57a755e66f20960 Mon Sep 17 00:00:00 2001 From: James BIddle Date: Tue, 23 May 2017 10:11:18 -0700 Subject: [PATCH 1/3] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 45aa284..b217369 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ assignment_ruby_warmup ====================== + + +James Biddle + Dice, dice, baby. [A Ruby assignment from the Viking Codes School](http://www.vikingcodeschool.com) From 746a8529c7e9c2778f116fe7219127e70e0039a9 Mon Sep 17 00:00:00 2001 From: James Biddle Date: Tue, 23 May 2017 11:01:18 -0700 Subject: [PATCH 2/3] intial commit --- rolling_dice.rb | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 rolling_dice.rb diff --git a/rolling_dice.rb b/rolling_dice.rb new file mode 100644 index 0000000..e69de29 From 6a84a45ffdbc835c18a726a81df720bb364a2e1c Mon Sep 17 00:00:00 2001 From: James Biddle Date: Tue, 23 May 2017 13:03:47 -0700 Subject: [PATCH 3/3] roll dice complete --- rolling_dice.rb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/rolling_dice.rb b/rolling_dice.rb index e69de29..8cfd264 100644 --- a/rolling_dice.rb +++ b/rolling_dice.rb @@ -0,0 +1,25 @@ +def roll_dice(n) + + + total = 1 + + n.times do |d| + total += rand(1..6) + end + puts total +end + + + +roll_dice(6) + +=begin + +roll_dice(4) + +total = 0 +n.times do + total += rand(1..6) +end + +=end \ No newline at end of file