{"id":16735471,"url":"https://github.com/thomasthaddeus/blackjackflask","last_synced_at":"2026-01-06T20:10:07.397Z","repository":{"id":239676691,"uuid":"799321888","full_name":"thomasthaddeus/BlackjackFlask","owner":"thomasthaddeus","description":"A Blackjack game built with Flask, featuring basic game logic, session management, and database integration. This project demonstrates a simple web-based implementation of Blackjack for learning and entertainment purposes.","archived":false,"fork":false,"pushed_at":"2024-05-28T16:28:00.000Z","size":500,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-29T00:17:17.630Z","etag":null,"topics":["blackjack","card-game","docker","flask","game-development","mongodb","python","rest-api","web-application"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomasthaddeus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-05-11T19:27:59.000Z","updated_at":"2024-06-05T07:36:19.559Z","dependencies_parsed_at":"2024-05-21T16:31:31.388Z","dependency_job_id":"4a76b1c5-5062-4164-b205-353c26cf92ad","html_url":"https://github.com/thomasthaddeus/BlackjackFlask","commit_stats":null,"previous_names":["thomasthaddeus/blackjackflask"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasthaddeus%2FBlackjackFlask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasthaddeus%2FBlackjackFlask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasthaddeus%2FBlackjackFlask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasthaddeus%2FBlackjackFlask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasthaddeus","download_url":"https://codeload.github.com/thomasthaddeus/BlackjackFlask/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245679881,"owners_count":20654927,"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","card-game","docker","flask","game-development","mongodb","python","rest-api","web-application"],"created_at":"2024-10-13T00:06:02.763Z","updated_at":"2026-01-06T20:10:07.391Z","avatar_url":"https://github.com/thomasthaddeus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blackjack Flask Application\n\nWelcome to the Blackjack Flask Application! This project implements a classic game of Blackjack using Python's Flask framework. Below you will find information on how to set up, run, and contribute to the project.\n\n## Overview\n\nThe Blackjack Flask Application is a web-based implementation of the classic Blackjack game, built using Python's Flask framework. This project allows users to play Blackjack against a virtual dealer with features such as hit, stand, double down, and surrender.\n\n## Table of Contents\n\n- [Blackjack Flask Application](#blackjack-flask-application)\n  - [Overview](#overview)\n  - [Table of Contents](#table-of-contents)\n  - [Features](#features)\n  - [Installation](#installation)\n  - [Usage](#usage)\n  - [Game Rules](#game-rules)\n    - [Doubling Down](#doubling-down)\n    - [Surrender](#surrender)\n  - [API Endpoints](#api-endpoints)\n    - [Getting Started](#getting-started)\n    - [Documentation](#documentation)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n## Features\n\n- **Classic Blackjack Gameplay:** Experience traditional Blackjack with standard rules.\n- **Double Down and Surrender:** Implemented game mechanics for doubling down and surrendering.\n- **Interactive Web Interface:** User-friendly interface with real-time updates using JavaScript and Bootstrap.\n- **Game State Persistence:** MongoDB integration for tracking user games and state persistence.\n- **API Endpoints:** RESTful API for game actions and state management.\n\n## Installation\n\nTo get started with the Blackjack Flask application, follow these steps:\n\n1. **Clone the repository:**\n\n   ```bash\n   git clone https://github.com/thomasthaddeus/BlackjackFlask.git\n   cd BlackjackFlask\n   ```\n\n2. **Set up a virtual environment:**\n\n   ```bash\n   python3 -m venv venv\n   source venv/bin/activate   # On Windows use `venv\\Scripts\\activate`\n   ```\n\n3. **Install the required dependencies:**\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. **Set up MongoDB:**\n   Ensure MongoDB is installed and running. Update the MongoDB connection string in the configuration file.\n\n5. **Run the application:**\n\n   ```bash\n   flask run\n   ```\n\n## Usage\n\nAfter running the application, open your browser and navigate to `http://127.0.0.1:5000` to start playing Blackjack.\n\n## Game Rules\n\n### Doubling Down\n\n- Allowed when the cards total 9, 10, or 11 without an ace, or when the cards total 16, 17, or 18 with an ace.\n\n### Surrender\n\n- **Early Surrender:** Available before the dealer checks for blackjack.\n- **Late Surrender:** Available after the dealer checks for blackjack.\n- **When to Surrender:**\n  - Surrender with a hard 16 against a dealer's 9, 10, or ace (except two 8s).\n  - Surrender with a hard 15 against a dealer's 10.\n\n## API Endpoints\n\n- `GET /api/start`: Starts a new game\n- `POST /api/hit`: Draws a card\n- `POST /api/stand`: Ends the player's turn\n- `POST /api/double`: Doubles the bet and draws one final card\n- `POST /api/surrender`: Surrenders the hand\n\n### Getting Started\n\nTo set up and run the application locally, follow the detailed instructions provided in the [Installation](docs/source/installation.rst) section of the documentation.\n\n### Documentation\n\nComprehensive documentation is available, covering all aspects of the application, including setup, usage, game rules, and API endpoints. Visit the [Documentation](https://your-readthedocs-url) to learn more.\n\n## Contributing\n\nWe welcome contributions from the community. Please see the [Contributing](docs/source/contributing.rst) section for guidelines on how to contribute to the project.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasthaddeus%2Fblackjackflask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasthaddeus%2Fblackjackflask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasthaddeus%2Fblackjackflask/lists"}