Speed up best-hand by not converting to ckf repeatedly

db4
Aaron Schaefer 2009-05-07 10:29:44 -04:00
parent e2c73b543a
commit 0878006bd0
1 changed files with 2 additions and 1 deletions

View File

@ -195,7 +195,8 @@ M: hand equal?
hand-rank VALUE_STR nth ;
: best-hand ( str -- hand )
" " split 5 all-combinations [ " " join <hand> ] map infimum ;
parse-cards 5 all-combinations
[ dup hand-value hand boa ] map infimum ;
TUPLE: deck
{ cards sequence } ;