Skip to the content.

Blackjack (21)

Overview

Blackjack, also known as 21, is a classic casino card game where players compete against the dealer to get a hand value as close to 21 as possible without going over.

Status: ✅ Available
Players: 1-5
Difficulty: Medium
Deck: 1 standard 52-card deck (6-deck shoe planned for future)

Objective

Beat the dealer by having a hand value closer to 21 than the dealer’s hand, without exceeding 21.

Rules

  1. Card Values:
    • Number cards (2-10) are worth their face value
    • Face cards (Jack, Queen, King) are worth 10
    • Aces are worth 1 or 11 (whichever is better for the hand)
  2. Blackjack: An Ace and a 10-value card on the first two cards is called “Blackjack” and pays 3:2

  3. Bust: If your hand exceeds 21, you “bust” and lose your bet

  4. Dealer Rules:
    • Dealer must hit on 16 or less
    • Dealer must stand on 17 or more
    • Dealer’s first card is face up, second card is face down (hole card)
  5. Winning:
    • If you have Blackjack and dealer doesn’t, you win 3:2
    • If you beat the dealer without busting, you win 1:1
    • If you tie with the dealer, it’s a “push” (bet returned)
    • If dealer busts and you don’t, you win 1:1

How to Play

Step 1: Place Your Bet

Step 2: Receive Initial Cards

Step 3: Make Your Decision

You have several options:

HIT - Take another card

STAND - Keep your current hand

DOUBLE DOWN - Double your bet and take exactly one more card

SPLIT - Split a pair into two separate hands

Step 4: Dealer’s Turn

Step 5: Determine Winner

Strategy Tips

Basic Strategy

  1. Always hit on 11 or less - You can’t bust
  2. Always stand on 17 or more - Risk of busting is too high
  3. Double down on 10 or 11 - When dealer shows 2-9
  4. Never take insurance - It’s a bad bet in the long run

When to Hit

When to Stand

When to Double Down

Implementation Details

Technology Stack

Features

API Endpoints Used

GET https://deckofcardsapi.com/api/deck/new/shuffle/?deck_count=1
GET https://deckofcardsapi.com/api/deck/{deck_id}/draw/?count=2
GET https://deckofcardsapi.com/api/deck/{deck_id}/shuffle/

File Structure

app/lib/features/games/
├── domain/
│   ├── models/
│   │   ├── card_model.dart          # Card and deck models
│   │   └── blackjack_model.dart     # Game state models
│   └── services/
│       └── deck_of_cards_service.dart # API service
├── application/
│   ├── blackjack_notifier.dart      # State management
│   └── card_asset_manager.dart      # Image preloading
└── presentation/
    ├── screens/
    │   └── blackjack_screen.dart    # Main game UI
    └── widgets/
        ├── playing_card_widget.dart # Card display
        ├── betting_panel.dart       # Betting UI
        └── game_controls.dart       # Hit/Stand buttons

Glossary

References