Handbook
Glossary
holdem-hand% ( hole1 deck community n -- x )
Vocabulary
poker
Inputs
hole1
an
object
deck
an
object
community
an
object
n
an
object
Outputs
x
an
object
Definition
USING:
arrays
kernel
math
math.order
random
sequences
;
IN:
poker
::
holdem-hand%
( hole1 deck community n -- x )
community
length
5
swap
-
2
+
:>
#samples n
[
drop
deck #samples
sample
:>
sampled sampled 2
cut
:>
( hole2 community2 ) hole1
community community2
3append
:>
hand1 hole2 community community2
3append
:>
hand2 hand1 hand2
[
best-holdem-hand
2array
]
compare
+lt+
=
]
count
;