Skip to content

Instantly share code, notes, and snippets.

View flarnie's full-sized avatar

Flarnie Marchan flarnie

View GitHub Profile
@flarnie
flarnie / Ruby Koans Scoring Project
Created June 15, 2013 23:47
My initial solution to 'about_scoring_project' from Neo Ruby Koans ( http://rubykoans.com/ ), koans 183-190.
def score(dice)
# You need to write this method
total_score = 0
def miniscore(n, c)
triple = n * 100
single = 0
if n == 1
triple = 1000
single = c >= 3 ? (c-3) * 100 : c * 100
elsif n == 5