collectHands {bridger}R Documentation

collectHands

Description

Returns a list of hands that fit a requirement. Simple hands will most often give the required bids. Complex hands, where a subsequent bid is made, may not fit the requirements, as other bids by opponents or partner may be preferable to the desired bidding pattern.

Usage

collectHands(handType = "opener", num = 6, ...)

Arguments

handType

Type of hands wanted

num

Number of hands requested

...

Other parameters to be passed to the find_ functions, e.g. HC_low, cardLen_low

Value

Tibble - One line per requested hand with hand ID, seat position and type of hand

Note

Each of the handTypes is a standard set of parameters. For example "NT" (alias "balanced") allows 12-14 points, a single doubleton and no 5-card majors and no 6-card minor. To change these parameters then optional parameters can be passed through the "...". The most common changes will be to specify the low and high high-card range and the shortest allowed suit and longest allowed. These are "HC_low" and "HC_high", "cardLen_low" and "cardLen_high" respectively.

Existing functions and key parameters are currently:

Single bids
HC_low HC_high cardLen_low cardLen_high
any 0 40 0 13
opener 12 40 0 13
1major 12 19 4 (Major) Any (Minor) 13
1NT 12 14 2 4
4441 12 40 1 4
strong 19 40 0 8
preempt2 5 10 0 6
preempt3 6 9 0 7
0 7
Complex bids 6 9 0 7
South West North East
1NT_LHOdouble 1NT X
1NT_LHObid 1NT Any
1NT_RHObid 1NT Pass Pass Any
1major_jacoby2NT 1major Pass 2NT(Jacoby)

Other parameters are also used, but individually assigned in the function.

Examples

## Not run: 
# Collect the ids of 2 hands with any shape
hands <- collectHands(num = 2)
# Collect 6 hands with opening points and a "4441" shape
hands <- collectHands(handType = "4441", num = 6)

# Collect a weak no-trump hand, with a point range of 11 to 15
hands <- collectHands(handType = "weakNT", num = 1, HC_low = 11, HC_high = 15)

## End(Not run)


[Package bridger version 0.1.0 Index]