playin-cards

Crates.ioplayin-cards
lib.rsplayin-cards
version0.1.2
sourcesrc
created_at2022-08-06 01:08:01.131646
updated_at2023-03-24 17:12:52.819132
description♠ Library for French-suited playing cards
homepage
repositoryhttps://gitlab.com/pezcore/rust-cards
max_upload_size
id639637
size34,247
(pezcore)

documentation

README

PLAYIN-CARDS

A crate for representing, formatting, and parsing French-Suited playing cards. The main objective of the project is to provide utility to crates implementing card games or card-game analysis.

Design

In keeping with the goals of being a lightweight library, as well as best practices with regard to separation of concerns, playin-cards is designed to be minimal, limiting its scope only the representation and conversion of playing cards. As such, it does not not provide shuffling, the concept of hands, or the concept of rank values. Such concerns are specific to the application using playin-cards and are therefore left to consumers to implement. This design maximizes the breadth of use-cases of playin-cards while minimizing its dependencies.

Features

  • Jokers
  • Iterable ranks and suits
  • ASCII and Unicode representations of cards, ranks, and suits
  • Copy semantics for all types
  • Single character representations of cards: 🃞
  • Convert single char to rank or suit
  • Convert 2-character str to card
  • Generate a shoe of arbitrary number of decks, with or without Jokers
Commit count: 70

cargo fmt