blackjack-multi


Nameblackjack-multi JSON
Version 0.1.6 PyPI version JSON
download
home_pagehttps://github.com/petersim1/blackjack-pypi
Summarya python package for multiplayer blackjack gameplay
upload_time2024-04-26 19:12:43
maintainerPeter Simone
docs_urlNone
authorPeter Simone
requires_python<4.0,>=3.11
licenseMIT
keywords blackjack
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Blackjack Gameplay

This is a python package for playing multiplayer blackjack. The modules retain state to allow for splits, doubles, surrenders, stay, and hit. Multiple players can play, can a single player can have > 1 hand due to splits.
Rules are flexible. By default, decks deplete until a stop card is hit. The module retains count, and manages rewards and possible actions.

## Overview

This comes with 3 main modules to work with, but Game wraps the other 2 and generally abstracts away the need to work with them directly.

## Example:

```
game = Game()

game.init_round([1, 1]) # 2 players, 1 unit each.
game.deal_init()

for i, player in enumerate(game.players):
    while not player.is_done():
        moves = player.get_valid_moves()
        # randomly take move, unless split is available.
        if "split" in moves:
            game.step_player(i, "split")
        else:
            move = choice(moves)
            game.step_player(i, move)

game.step_house(only_reveal_card=True)
while not game.house_done():
    game.step_house()

game.get_results()
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/petersim1/blackjack-pypi",
    "name": "blackjack-multi",
    "maintainer": "Peter Simone",
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": "plssimone@gmail.com",
    "keywords": "blackjack",
    "author": "Peter Simone",
    "author_email": "plssimone@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/7f/9e/be3e6eb55a6bc53d2666a2803773623753c3695a38761729ce448d1bb330/blackjack_multi-0.1.6.tar.gz",
    "platform": null,
    "description": "# Blackjack Gameplay\n\nThis is a python package for playing multiplayer blackjack. The modules retain state to allow for splits, doubles, surrenders, stay, and hit. Multiple players can play, can a single player can have > 1 hand due to splits.\nRules are flexible. By default, decks deplete until a stop card is hit. The module retains count, and manages rewards and possible actions.\n\n## Overview\n\nThis comes with 3 main modules to work with, but Game wraps the other 2 and generally abstracts away the need to work with them directly.\n\n## Example:\n\n```\ngame = Game()\n\ngame.init_round([1, 1]) # 2 players, 1 unit each.\ngame.deal_init()\n\nfor i, player in enumerate(game.players):\n    while not player.is_done():\n        moves = player.get_valid_moves()\n        # randomly take move, unless split is available.\n        if \"split\" in moves:\n            game.step_player(i, \"split\")\n        else:\n            move = choice(moves)\n            game.step_player(i, move)\n\ngame.step_house(only_reveal_card=True)\nwhile not game.house_done():\n    game.step_house()\n\ngame.get_results()\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "a python package for multiplayer blackjack gameplay",
    "version": "0.1.6",
    "project_urls": {
        "Homepage": "https://github.com/petersim1/blackjack-pypi",
        "Repository": "https://github.com/petersim1/blackjack-pypi"
    },
    "split_keywords": [
        "blackjack"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0e131e2a8dbc730426e6061324a44c8084d068adb880f37ef6614f4ce30ece7b",
                "md5": "f851296a026586cac6f65f897aa762c7",
                "sha256": "54dbb079f58c73120452460740791d6ae89c2ed9736d68cf1b73b3d228cf2840"
            },
            "downloads": -1,
            "filename": "blackjack_multi-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f851296a026586cac6f65f897aa762c7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 8961,
            "upload_time": "2024-04-26T19:12:41",
            "upload_time_iso_8601": "2024-04-26T19:12:41.309854Z",
            "url": "https://files.pythonhosted.org/packages/0e/13/1e2a8dbc730426e6061324a44c8084d068adb880f37ef6614f4ce30ece7b/blackjack_multi-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7f9ebe3e6eb55a6bc53d2666a2803773623753c3695a38761729ce448d1bb330",
                "md5": "22a97f864a0c4de017e38c2f78f4230a",
                "sha256": "ba99563328a4f0c39807501d1aff4741b4af553f561eaf0d91d171f20a667651"
            },
            "downloads": -1,
            "filename": "blackjack_multi-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "22a97f864a0c4de017e38c2f78f4230a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 7545,
            "upload_time": "2024-04-26T19:12:43",
            "upload_time_iso_8601": "2024-04-26T19:12:43.149817Z",
            "url": "https://files.pythonhosted.org/packages/7f/9e/be3e6eb55a6bc53d2666a2803773623753c3695a38761729ce448d1bb330/blackjack_multi-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-26 19:12:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "petersim1",
    "github_project": "blackjack-pypi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "blackjack-multi"
}
        
Elapsed time: 0.38629s