{"id":27515699,"url":"https://github.com/dynamic-stall/blackjack-python","last_synced_at":"2025-04-18T01:18:06.824Z","repository":{"id":288135601,"uuid":"966959065","full_name":"dynamic-stall/blackjack-python","owner":"dynamic-stall","description":"Terminal-based, single-player Blackjack game using Python","archived":false,"fork":false,"pushed_at":"2025-04-15T18:11:20.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T18:48:31.815Z","etag":null,"topics":["blackjack","blackjack-cli","blackjack-game","blackjack-python","card-game","pandas","python","python-game","python-games","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dynamic-stall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-15T17:55:34.000Z","updated_at":"2025-04-15T18:11:23.000Z","dependencies_parsed_at":"2025-04-15T18:48:34.064Z","dependency_job_id":"33b1c7d3-83db-4d8a-aae5-e5135fd92220","html_url":"https://github.com/dynamic-stall/blackjack-python","commit_stats":null,"previous_names":["dynamic-stall/blackjack-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynamic-stall%2Fblackjack-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynamic-stall%2Fblackjack-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynamic-stall%2Fblackjack-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynamic-stall%2Fblackjack-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dynamic-stall","download_url":"https://codeload.github.com/dynamic-stall/blackjack-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249404348,"owners_count":21265797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blackjack","blackjack-cli","blackjack-game","blackjack-python","card-game","pandas","python","python-game","python-games","python3"],"created_at":"2025-04-18T01:18:06.097Z","updated_at":"2025-04-18T01:18:06.818Z","avatar_url":"https://github.com/dynamic-stall.png","language":"Python","readme":"# Python Blackjack Game\n\nA simple command-line blackjack game implemented in Python.\n\n## Features\n- Single-player gameplay against the dealer\n- Visual card representation in the terminal\n- Chip-based betting system (white $1, red $5, green $25, black $100, purple $500, orange $1000)\n- Account balance tracking with transaction history\n- Interactive gameplay with options to hit, stand, or double down\n\n## Installation\n\n1. Clone this repository:\n```bash\ngit clone https://github.com/dynamic-stall/blackjack-python.git\ncd blackjack-python\n```\n\n2. Create and activate the conda environment from the provided file:\n```bash\nconda env create -f environment.yml\nconda activate blackjack\n```\n- (Refer to my [aws-iam-credential-report](https://github.com/dynamic-stall/aws-iam-credential-report/) repo for Miniconda installation assistance, if Python is not present on your system.)\n\n## Project Structure\n```\nblackjack-python/\n├── __init__.py\n├── account.py          # Account management for betting\n├── card_components.py  # Card, Deck, and Hand classes\n├── constants.py        # Game constants (cards, chips)\n├── environment.yml     # Conda environment configuration\n├── game.py             # Main game logic\n├── main.py             # Entry point\n├── players.py          # Player and Dealer classes\n└── README.md           # (This file)\n```\n\n## How to Play\n\n1. Run the game directly:\n```bash\npython3 main.py\n```\n\n2. Enter your name when prompted\n\n3. Place bets using chip colors:\n   - Format: \"[number] [color] [number] [color] ...\"\n   - Example: \"2 black 1 green\" for $225 ($100 x 2 + $25)\n\n4. Game Actions:\n   - `hit`: Draw another card\n   - `stand`: Keep current hand\n   - `double`: Double your bet and receive one more card (only available on initial hand)\n\n5. Win Conditions:\n   - Get closer to 21 than the dealer without going over\n   - Dealer busts (goes over 21)\n   - Initial two cards totaling 21 (Blackjack)\n\n## Note\nThis game uses pandas for transaction tracking. Make sure you have it installed via the ```environment.yml``` file.\n\n## Future Improvements (at some point...)\n- Multiple player support\n- Split pairs option\n- Insurance bets\n- Save game progress\n- Statistics tracking","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynamic-stall%2Fblackjack-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdynamic-stall%2Fblackjack-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynamic-stall%2Fblackjack-python/lists"}