R/onepair1.R

Defines functions onepair1

Documented in onepair1

onepair1 <-
function(x){
## 15*15*15*pair + 15*15*next + 15*next + next
a1 = unique(x)
a2 = length(a1)
if(a2 == length(x)) return(0)
a3 = rep(0,a2)
for(i in 1:a2) a3[i] = sum(x == a1[i])
a4 = max(a1[a3>1.5])
a5 = sort(c(x[x != a4],rep(0,3)),decreasing=TRUE)
15*15*15*a4 + 225*a5[1] + 15*a5[2] + a5[3]
}

Try the holdem package in your browser

Any scripts or data that you put into this service are public.

holdem documentation built on May 2, 2019, 9:21 a.m.