@patch
def __eq__(self:Card, a:Card): return (self.suit, self.rank) == (a.suit, a.rank)Card - A basic playing Card
A simple API for creating playing card
Card
Card (suit:int, rank:int)
A playing card, created by passing in rank from ranks and suit from suits
| Type | Details | |
|---|---|---|
| suit | int | An index into suits |
| rank | int | An index into ranks |
Comparison Operators
Equality, less than and greater than work on the rank and indicies