{ "info": { "author": "Jacobi Petrucciani", "author_email": "jacobi@mimirhq.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "gamble\n==============================================\n\n.. image:: https://travis-ci.org/jpetrucciani/gamble.svg?branch=master\n :target: https://travis-ci.org/jpetrucciani/gamble\n\n\n.. image:: https://badge.fury.io/py/gamble.svg\n :target: https://badge.fury.io/py/gamble\n :alt: PyPI version\n\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/ambv/black\n :alt: Code style: black\n\n\n.. image:: https://img.shields.io/badge/python-3.6+-blue.svg\n :target: https://www.python.org/downloads/release/python-360/\n :alt: Python 3.6+ supported\n\n\n**gamble** is a simple library that implements a collection of some common gambling-related classes\n\n\nFeatures\n--------\n\n- die, dice, d-notation\n- cards, decks, hands\n- poker ranks, hand comparison\n\nUsage\n-----\n\nInstallation\n^^^^^^^^^^^^\n\n.. code-block:: bash\n\n pip install gamble\n\nBasic Usage\n-----------\n\nDice\n^^^^\n\n.. code-block:: python\n\n import gamble\n\n # create dice, defaults to 2 6-sided dice\n dice = gamble.Dice()\n\n # roll\n dice.roll()\n >>> 6\n dice.rolls\n >>> 1\n\n # max, min\n dice.max\n >>> 12\n dice.min\n >>> 2\n\n # d-notation for dice constructor\n dice = gamble.Dice('d20+8')\n \n # max, min\n dice.max\n >>> 28\n dice.min\n >>> 9\n\n # parts\n dice.parts\n >>> [, 8]\n\n\nCards\n^^^^^\n\n.. code-block:: python\n\n import gamble\n\n # create a deck, defaults to the standard 52 card deck, no jokers\n # the deck will be shuffled by default, unless you pass shuffle=False\n deck = gamble.Deck()\n\n deck.cards_left\n >>> 52\n \n deck.top\n >>> \n deck.bottom\n >>> \n deck.shuffle() # you can also pass times=(int) to shuffle more than once\n\n card = deck.draw() # you can also pass times=(int) to draw a list of cards\n >>> \n\n # the unicode cards icons are implemented as well!\n card.unicode\n >>> \"\ud83c\udca1\"\n\n # draw a poker hand, default size 5\n hand = deck.draw_hand(). # you can pass size=(int) to draw a different size hand\n >>> \n\n hand.rank\n >>> Rank(name='straight flush', value=8)\n\n # arbitrary hand, from text notation\n new_hand = gamble.Hand.get(\"2c,3c,4c,Kc,Kh\")\n >>> \n\n new_hand.rank\n >>> Rank(name='pair', value=1)\n\n hand > new_hand\n >>> True\n\nTodo\n----\n- hand equals/ge/le method\n- hand ranking when hands are very similar", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/jpetrucciani/gamble.git", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jpetrucciani/gamble.git", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "gamble", "package_url": "https://pypi.org/project/gamble/", "platform": "", "project_url": "https://pypi.org/project/gamble/", "project_urls": { "Download": "https://github.com/jpetrucciani/gamble.git", "Homepage": "https://github.com/jpetrucciani/gamble.git" }, "release_url": "https://pypi.org/project/gamble/0.0.6/", "requires_dist": null, "requires_python": "", "summary": "a collection of gambling classes/tools", "version": "0.0.6" }, "last_serial": 5768638, "releases": { "0.0.4": [ { "comment_text": "", "digests": { "md5": "7034793a60cfa482bc90803c6cd027cb", "sha256": "c0d637dfa3db369ebe4639820520a927f76986a14652c6038b5f8592f89a723d" }, "downloads": -1, "filename": "gamble-0.0.4.tar.gz", "has_sig": false, "md5_digest": "7034793a60cfa482bc90803c6cd027cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3045, "upload_time": "2019-08-31T17:57:03", "url": "https://files.pythonhosted.org/packages/10/84/a58b8e4ac7b064ad8997ba98264bd2a5434ccbce87e3753f977e6e8cc81a/gamble-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "da22ef1ddf6ac150bd126a298769c488", "sha256": "245fc013e862a63c0e2e1b7e85996b3a97e4a342ac9d20e2e16d926fc522d437" }, "downloads": -1, "filename": "gamble-0.0.5.tar.gz", "has_sig": false, "md5_digest": "da22ef1ddf6ac150bd126a298769c488", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5857, "upload_time": "2019-09-01T18:50:34", "url": "https://files.pythonhosted.org/packages/37/2f/181768e20c24ac8a8927859104d222c7387abc4f56caa735a0559818f599/gamble-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "ccc391834e7ec786f49c071277703deb", "sha256": "8ef7b138ea932e1cd6701824b25f2e788860f331455279ec9212d75a4e728909" }, "downloads": -1, "filename": "gamble-0.0.6.tar.gz", "has_sig": false, "md5_digest": "ccc391834e7ec786f49c071277703deb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8129, "upload_time": "2019-09-02T02:03:11", "url": "https://files.pythonhosted.org/packages/eb/e4/6ce20ff81c4426a3e8535233a9d1108dccf01a8ba701f0375f92275a8c15/gamble-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ccc391834e7ec786f49c071277703deb", "sha256": "8ef7b138ea932e1cd6701824b25f2e788860f331455279ec9212d75a4e728909" }, "downloads": -1, "filename": "gamble-0.0.6.tar.gz", "has_sig": false, "md5_digest": "ccc391834e7ec786f49c071277703deb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8129, "upload_time": "2019-09-02T02:03:11", "url": "https://files.pythonhosted.org/packages/eb/e4/6ce20ff81c4426a3e8535233a9d1108dccf01a8ba701f0375f92275a8c15/gamble-0.0.6.tar.gz" } ] }