holdem-hand% ( hole1 deck community n -- x )


Vocabulary
poker

Inputs
hole1an object
deckan object
communityan object
nan object


Outputs
xan object


Definition


:: 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 ;