From: Patrick Hurley Date: 2005-03-24T06:33:57+09:00 Subject: Re: [SOLUTION][QUIZ] Texas Hold'Em (#24) The delta transform creates a version of the cards where the delta between card values is in the string, so a regexp can then match a straight and/or straight flush - I used regexp to match all my cases with appropriate sort and/or transforms. Patrick On Thu, 24 Mar 2005 05:40:01 +0900, Dave Burt wrote: > "Patrick Hurley" tested: > > Dave I am still looking over your code, but since I got your test data > > last week here is some for you). This was a tough one, lots of > > combinations - now I know why I don't gamble. Your card abstraction > > seems very complete, did it come from some place else? I did some of > > the same, but realized I was getting too far afield for the quiz alone > > and stopped myself (I can be accused of over engineering sometimes :-) > > > > Patrick > > > > Input: > > > > Thanks Pat, I will look at this later today when I get the time. I will add > some more tests than that, too, to try and trap another suspected bug: I > fear Two pairs are not evaluated correctly by highest pair then second pair. > These example output lines show this: > 2s 2h 3d 3s 9c Ts As Two Pair # from your test > 9c 9d Ks Kd 3c 6d Ah Two Pair # from the quiz definition > That's what you get for programming after bed-time. > > I had already written card.rb for an implementation of blackjack > (blackjack.rb). > > I haven't had a chance to look over any solutions in detail yet, but I saw > your "delta transform" and its use and am intrigued - what is that? > > Cheers, > Dave > >