print(suits)['♣️', '♦️', '♥️', '♠️']
Using numbers to represent cards and ranks
For instance the suit at index (0)
These are the ranks
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 |
An example of creating and displaying a card
Equality tests on the rank and suit indices
For example, here is a test for equality
A test of < and >