Suit - lcrocker/ojpoker GitHub Wiki

Suit

The Suit class in both languages is a simple enum with a few methods for converting to/from text and such. Although I assign values below, the library does not yet make any provision for non-French-suited decks or decks with more than four suits like Ganjifa.

Although enums in most languages are used to hide the specific numbers involved, the are important and are enforced to ensure compatibility between languages.

Value Suit (French, Latin [ES, IT, PT], German, Swiss, Tarot)
1 Clubs / Batons / Acorns / Acorns / Wands
2 Diamonds / Coins / Bells / Bells / Pentacles
3 Hearts / Cups / Hearts / Roses / Cups
4 Spades / Swords / Leaves / Shields / Swords

Source files

Dart  ยท  Rust

Questions, comments?