diff --git a/extra/poker/poker-tests.factor b/extra/poker/poker-tests.factor index 3e5bab9ac6..fc10a13659 100644 --- a/extra/poker/poker-tests.factor +++ b/extra/poker/poker-tests.factor @@ -1,4 +1,5 @@ -USING: accessors kernel math.order poker poker.private tools.test ; +USING: accessors kernel math math.order poker poker.private +tools.test ; IN: poker.tests [ 134236965 ] [ "KD" >ckf ] unit-test diff --git a/extra/poker/poker.factor b/extra/poker/poker.factor index 9c68aaaa97..59f50509e4 100644 --- a/extra/poker/poker.factor +++ b/extra/poker/poker.factor @@ -260,5 +260,8 @@ ERROR: bad-suit-symbol ch ; : value>hand-name ( value -- string ) value>rank VALUE_STR nth ; +: string>hand-name ( string -- string' ) + string>value value>hand-name ; + SYNTAX: HAND{ "}" parse-tokens [ card> ] { } map-as suffix! ;