Skip to content
ImAust1nPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

♠️♥️ Streamlit Blackjack 21 ♣️♦️

A fully playable Blackjack (21) web application built using Pygame and Streamlit!

Python Streamlit Pygame


Experience the thrill of the casino from your browser! The game renders high-quality Pygame graphics headlessly and streams them directly to your browser for a smooth, interactive casino experience.


✨ Features

  • 🃏 Classic Rules: Hit, Stand, Double Down, and Split functionality.
  • 💰 Dynamic Betting: Place custom bets with a slider. Balance and bets persist across rounds.
  • 🎬 Slick Animations: Realistic, sequential card-dealing animations slide right out of the deck.
  • 📱 Responsive UI: Built natively into Streamlit with an intuitive, side-by-side wide layout.
  • 🖥️ Headless Engine: Uses a virtual SDL video driver to run Pygame on any server without needing a physical display.

🛠️ Installation & Setup

Make sure you have Python 3.8+ installed on your system.

1. Clone the repository:

git clone https://github.com/ImAust1n/BlackJack.git
cd BlackJack

2. Create a virtual environment (Recommended):

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

3. Install dependencies:

pip install -r requirements.txt

🚀 Running the Game

Launch the web interface using Streamlit:

streamlit run blackjack.py

The game will automatically open in your default web browser at http://localhost:8501.


🎮 How to Play

The Setup

Slide to select your bet amount and click Deal.

Player Actions

Action Description
Hit 🎯 Draw another card.
Stand 🛑 End your turn and let the dealer play.
Double Down 💸 Double your bet, receive exactly one more card, and stand.
Split ✌️ If you have two cards of the exact same value, you can split them into two separate hands (requires an additional bet equal to your original bet).

Payouts & Rules

  • The dealer reveals their hidden card and automatically hits until they reach 17 or higher.
  • Normal Win: Pays 1:1.
  • Blackjack! (Ace + 10-value): Pays 3:2.
  • Push: Ties result in your bet being returned.
  • Bankrupt: If you run out of chips, it's game over. You'll need to restart!

💡 Pro Tip

For the ultimate immersive experience, press F11 to make your web browser completely full screen!


Built with Pillow, Pygame, and Streamlit.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages