# File lib/quiz1/t/solutions/Glen M. Lewis/solitaire.rb, line 29 def calc_value(face_value, suit) val = 0 case suit when "S" then val += 39 when "H" then val += 26 when "D" then val += 13 when "C" else puts "ERROR: Unknown suit: #{suit}, should be C,D,H,S" end case face_value when 2..10 then val += face_value when "A" then val += 1 when "J" then val += 11 when "Q" then val += 12 when "K" then val += 13 else puts "ERROR: Unknown card face value: #{face_value}, should be A,2-10,J,Q,K" end return val end