Card

Represents a standard playing card. Attributes: suit: integer 0-3 rank: integer 1-13

Methods

init

Parameters

namedescriptiondefault

self

suit

0

rank

2

str

Returns a human-readable string representation.

Parameters

namedescriptiondefault

self

eq

Checks whether self and other have the same rank and suit. returns: boolean

Parameters

namedescriptiondefault

self

other

lt

Compares this card to other, first by suit, then rank. returns: boolean

Parameters

namedescriptiondefault

self

other

Last updated