On Jun 5, 2013, at 2:41 AM, Jay Reeve <jayreeve@...> wrote:

BTW, I believe the one you posted would fail with A 2 3 6 7, returning 4
Thanks, found this too. It actually fails with any two card run with or without a starting run and is a glaring hole in the logic( thus my warnings ). It didn’t return numCards to 1 when there is neither evidence of a run ( i.e. a value of one difference between two adjacent cards ) nor evidence of a repeating card ( e.g. two adjacent aces ). My fix makes my code look similar to Jay’s code but with different variable names and those intermediate variables. Otherwise the logic is the same. 

One trivial/minor difference for any looking at generated C code:

select switch( h.rank(r+1) - h.rank )  produces more readable C code than 

select h.rank(r+1) - h.rank(r)

because the former translates to a C  select/case while the latter is 'if' statements

Brian S.





--
To unsubscribe, send ANY message to: futurebasic-unsubscribe@... To access the list archives, go to: http://freegroups.net/groups/futurebasic/