endplay.types.rank

Classes:

AlternateRank(value)

Encodes the rank of a suit using the values 2-14.

Rank(value)

Encodes the rank of a suit.

class endplay.types.rank.AlternateRank(value)

Bases: IntEnum

Encodes the rank of a suit using the values 2-14. Used for internal functions, for APIs use the Rank class.

Attributes:

R2

R3

R4

R5

R6

R7

R8

R9

RA

RJ

RK

RQ

RT

abbr

Methods:

find(value)

to_standard()

R2 = 2
R3 = 3
R4 = 4
R5 = 5
R6 = 6
R7 = 7
R8 = 8
R9 = 9
RA = 14
RJ = 11
RK = 13
RQ = 12
RT = 10
property abbr: str
static find(value: str) AlternateRank
to_standard() Rank
class endplay.types.rank.Rank(value)

Bases: IntEnum

Encodes the rank of a suit. The standard values use powers of two, however some internal functions use an alternative encoding AlternateRank using the values 2-14.

Attributes:

R2

R3

R4

R5

R6

R7

R8

R9

RA

RJ

RK

RQ

RT

abbr

Methods:

find(value)

to_alternate()

R2 = 4
R3 = 8
R4 = 16
R5 = 32
R6 = 64
R7 = 128
R8 = 256
R9 = 512
RA = 16384
RJ = 2048
RK = 8192
RQ = 4096
RT = 1024
property abbr: str
static find(value: str) Rank
to_alternate() AlternateRank