I've finished the greed problem in Ruby Koans after much confusion. This is my first programming language and I have been doing fine, but then this problem really tripped me up for some reason, perhaps because it is one of the first problems where I need to be creating my own method. I eventually came up with this - can you give me your feedback about it? Is it totally inefficient, whats wrong with it? How would you improve it, and how should I as a novice approach my education - should I settle for the way my mind works right now when I think about problem solving or should I try to understand more complex approaches to the code?def score(dice)  total = 0  count = (1..6).each do |n|  # for each die, make sure we've counted how many occurrencess there are  die_value = dice.each { |d| d == n }   # iterate over each, and handle points for singles and triples  point_totals = die_value.size  total += 1000 if die_value.size == 3 and d == 1  total + 1000 + (point_totals - 3)*100 if die_value.size > 3 and d == 1  total += 500 if die_value.size == 3 and d == 5  total + 500 + (point_totals - 3)*50 if die_value.size > 3 and d == 5  end
Greed in Ruby Koans
beginner;ruby;programming challenge;dice