From: James Gray Date: 2008-01-10T12:36:54+09:00 Subject: Re: [QUIZ] Studying Blackjack (#151) On Jan 9, 2008, at 5:52 PM, Sander Land wrote: > On Jan 9, 2008 9:10 PM, James Gray wrote: >> On Jan 6, 2008, at 9:42 AM, Sander Land wrote: >> >>> class Array >>> def score >>> sort.inject(0){|s,c| s+c > 21 && c==11 ? s+1 : s+c } >>> end >>> end >> >> That has the some bug Eric found in Dennis's code: >> >>>> [10, 11, 11].score >> => 22 > > Thanks. I should have thought of this considering Dennis' results > matched mine. > Here's my corrected solution. I renamed the ace to "1" for a more > elegant solution. :) Neat. Just know that I wrote tomorrow's summary before you did this. ;) James Edward Gray II