How seokryung/nbdev_cards works
nbdev_cards is a small playing-card library. A user creates a Card, whose suit and rank determine its display and comparison behavior; the library also provides a Deck for card collection operations and a draw_n helper for drawing cards. The deck constructs Card instances and uses Python’s random module to shuffle or select cards. The source excerpts show these runtime relationships; the README specifically documents Card creation, display, and comparison.
Main entry points: deck.py Deck · card.py Card API
Components 6
Card model
- Suit and rank values
nbdev_cards/card.py - Card API
nbdev_cards/card.py
Deck operations
- Deck
nbdev_cards/deck.py - draw_n helper
nbdev_cards/deck.py
Other components
- Library user
- Python random
Connections 6
- Library user → Card API: creates and uses
README.md - Card API → Suit and rank values: formats with
nbdev_cards/card.py - Deck → Card API: constructs
nbdev_cards/deck.py - Deck → Python random: shuffles with
nbdev_cards/deck.py - draw_n helper → Deck: creates and shuffles
nbdev_cards/deck.py - draw_n helper → Python random: selects with
nbdev_cards/deck.py