nbdev_cards

A sample of how to create a deck of cards lib using nbdev.

A deck of cards demo of nbdev based on ideas from Think Python, 2nd edition by Allen B. Downey.

Usage

Installation

Install latest from the GitHub repository:

$ pip install git+https://github.com/kalch/nbdev_cards.git

or from conda

$ conda install -c kalch nbdev-cards

or from pypi

$ pip install nbdev-cards

Documentation

Documentation can be found hosted on this GitHub repository’s pages. Additionally you can find package manager specific guidelines on conda and pypi respectively.

How to use

This lib provides a Card class you can use to create, display, and compare playing cards.

Card(1,3)
3♦️

Suits are numbered according to this list:

suits
['♣️', '♦️', '♥️', '♠️']