Learn R Programming

holdem (version 1.2)

flushdraw1: Sees if you have a flush draw.

Description

Calculates how many you have of the suit of which you have most.

Usage

flushdraw1(x)

Arguments

x

Suits of your cards and the board cards (together, as a vector).

Value

returns the number you have of a suit, i.e. 4 if you have a flush draw, or 5 (or more) if you have a flush already.

Examples

Run this code
# NOT RUN {
x = c(1,2,4,1,3,1,1)
flushdraw1(x)
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function(x){
    a1 = mycount1(x)
    max(a1$ct)
  } ## end of flushdraw1
# }

Run the code above in your browser using DataLab