]> gitweb.factorcode.org Git - factor.git/commitdiff
Update docs/summary for poker vocab
authorAaron Schaefer <aaron@elasticdog.com>
Thu, 7 May 2009 22:50:46 +0000 (18:50 -0400)
committerAaron Schaefer <aaron@elasticdog.com>
Thu, 7 May 2009 22:50:46 +0000 (18:50 -0400)
extra/poker/poker-docs.factor
extra/poker/summary.txt

index ab0a59ed4f8a73cca2061d381ede0d2866f622c0..388239d549257968b716d8363e18218f97b9e411 100644 (file)
@@ -2,7 +2,7 @@ USING: help.markup help.syntax strings ;
 IN: poker
 
 HELP: <hand>
-{ $values { "str" string } { "hand" "a new hand" } }
+{ $values { "str" string } { "hand" "a new " { $link hand } } }
 { $description "Creates a new poker hand containing the cards specified in " { $snippet "str" } "." }
 { $examples
     { $example "USING: kernel math.order poker prettyprint ;"
@@ -13,7 +13,7 @@ HELP: <hand>
 { $notes "Cards may be specified in any order. Hands are directly comparable to each other on the basis of their computed value. Two hands are considered equal when they would tie in a game (despite being composed of different cards)." } ;
 
 HELP: best-hand
-{ $values { "str" string } { "hand" "a new hand" } }
+{ $values { "str" string } { "hand" "a new " { $link hand } } }
 { $description "Creates a new poker hand containing the best possible combination of the cards specified in " { $snippet "str" } "." }
 { $examples
     { $example "USING: kernel poker prettyprint ;"
@@ -21,7 +21,7 @@ HELP: best-hand
 } ;
 
 HELP: >cards
-{ $values { "hand" "a hand" } { "str" string } }
+{ $values { "hand" hand } { "str" string } }
 { $description "Outputs a string representation of a hand's cards." }
 { $examples
     { $example "USING: poker prettyprint ;"
@@ -29,10 +29,18 @@ HELP: >cards
 } ;
 
 HELP: >value
-{ $values { "hand" "a hand" } { "str" string } }
+{ $values { "hand" hand } { "str" string } }
 { $description "Outputs a string representation of a hand's value." }
 { $examples
     { $example "USING: poker prettyprint ;"
         "\"AC KC QC JC TC\" <hand> >value ." "\"Straight Flush\"" }
 }
 { $notes "This should not be used as a basis for hand comparison." } ;
+
+HELP: <deck>
+{ $values { "deck" "a new " { $link deck } } }
+{ $description "Creates a standard deck of 52 cards." } ;
+
+HELP: shuffle
+{ $values { "deck" deck } { "deck" "a shuffled " { $link deck } } }
+{ $description "Shuffles the cards in " { $snippet "deck" } ", in-place, using the Fisher-Yates algorithm." } ;
index c8efe851c814f132ba015e3cb01e4cdf2978993c..8dbbe9bd7420fe2859c78b0ea8d9b74c4828794a 100644 (file)
@@ -1 +1 @@
-5-card poker hand evaluator
+Poker hand evaluator