endplay.types.denom

Classes:

Denom(value)

Encoding for suits and contract denomination

class endplay.types.denom.Denom(value)

Bases: IntEnum

Encoding for suits and contract denomination

Attributes:

abbr

return:

A short identifier for the denomination

clubs

diamonds

hearts

nt

spades

Methods:

bidorder()

return:

An iterator over all the denominations in the order they appera in a bidding box

find(name)

Convert a string value into a Denom object

is_major()

return:

True if the denomination is spades or hearts

is_minor()

return:

True if the denomination is diamonds or clubs

is_suit()

return:

True if the denomination is not notrumps

suits([reverse])

Iterate over the suits, excluding notrumps

property abbr: str
Returns:

A short identifier for the denomination

static bidorder() Iterator[Denom]
Returns:

An iterator over all the denominations in the order they appera in a bidding box

clubs = 3
diamonds = 2
static find(name: str) Denom

Convert a string value into a Denom object

hearts = 1
is_major() bool
Returns:

True if the denomination is spades or hearts

is_minor() bool
Returns:

True if the denomination is diamonds or clubs

is_suit() bool
Returns:

True if the denomination is not notrumps

nt = 4
spades = 0
static suits(reverse: bool = False) Iterator[Denom]

Iterate over the suits, excluding notrumps

Parameters:

reverse – If true, return suits in the order clubs -> spades

Returns:

An iterator over the four suits