Tirsvad f8bccaf749
TirSystem/git-workflows: Release / release (push) Skipped
TirSystem/git-workflows: Sync GitHub mirror metadata / sync-metadata (push) Successful in 47s
TirSystem/git-workflows: Publish wiki / publish-wiki (push) Successful in 1m36s
TirSystem/git-workflows: Publish accepted milestones / publish (push) Successful in 1m41s
TirSystem/git-workflows: Validate / validate (push) Successful in 1m7s
TirSystem/git-workflows: OpenGrep / opengrep (push) Successful in 3m5s
Merge pull request 'Add the framework baseline: gateway MIL-003, wiki, README, licence metadata' (#26) from mil-003-framework-baseline into main
2026-11-15 10:16:49 +01:00
2026-11-15 17:13:29 +08:00
2026-10-04 15:19:05 +02:00

🃏 Blackjack

A console Blackjack game against a computer dealer, played with emoji cards. It is the day 11 capstone of Udemy's 100 Days of Code: The Complete Python Pro Bootcamp, built with a plan-first process (milestones and issues in docs/).

📚 Table of Contents

🧭 Overview

The game is the day 11 capstone of the course. You and the computer dealer each get two cards, shown as emoji. You choose to draw another card (y) or to pass (n); then the dealer draws while its score is below 17, and the program tells you who won. Afterwards you can play again.

House rules:

  • The deck is unlimited; cards are not removed when drawn. No jokers.
  • Jack, Queen and King count 10. An ace counts 11 or 1.
  • A two-card hand of ace + 10 is a blackjack.
  • The computer is the dealer and draws while its score is below 17.

📋 Requirements

  • Python 3.13 or newer
  • No runtime dependencies
  • Optional: Doxygen to build the source documentation
  • A terminal with UTF-8 and emoji support (for example Windows Terminal)

🛠️ Setup

Create and activate a local virtual environment, upgrade pip, then install the project in editable mode with the development tools.

Windows (PowerShell):

python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

Linux and macOS:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

Leave the environment with deactivate.

▶️ Run

Start the game from the activated virtual environment:

python -m blackjack

🧪 Tests

python -m unittest discover -s tests

pytest also runs the same tests (python -m pytest).

Lint and type check:

ruff check .
ruff format --check .
mypy src

Build the source documentation from the Doxygen comments in src/ (written to docs/doxygen/):

doxygen Doxyfile

📄 License

The code is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). See LICENSE.

📎 Appendix: Project documents

The documents a newcomer needs, in reading order.

Document What it tells you
Business Case Why the project exists, its scope and success criteria
Stakeholder Analysis Who is involved; the stakeholder IDs used for owners and reviewers
Project Plan The gateways and their schedule
Milestones One document per gateway: Go/No-Go criteria and tasks
Artifact registry Where each artifact type lives, the next version, the PO language and domain
Traceability matrix How the artifacts link and when each was last reviewed

S
Description
Console Blackjack game with emoji cards (Udemy 100 Days of Code, day 11)
Readme AGPL-3.0
290 KiB
0 Stars 1 Watchers 0 Forks
Languages
Python 100%