Skip to content

Cross-platform Blackjack game for the terminal, written in C#. Self-contained & open source (GPL-3.0).

License

Notifications You must be signed in to change notification settings

Porzeraklon/blackjack

Repository files navigation

🃏 BlackJack CLI

BlackJack CLI is a lightweight, terminal-based implementation of the classic Blackjack card game written in C#. It features a human player vs dealer, optional card counting bot, and full game logic including split, double down, and insurance.

📸 Gameplay Preview


Start screen


Place your bet


Example round


Dealer hits Blackjack

🎯 Features

  • Play classic Blackjack in your terminal (CLI)
  • Support for doubling, splitting, and insurance
  • Dealer AI and full player decision handling
  • Card counting bot that can play for you
  • Optimal for card-counting (counter enabled by default)
  • Cross-platform: Windows, Linux, macOS
  • Self-contained builds (no .NET installation required)

⌨️ Controls

You can type the full command or just the first letter:

  • Hith
  • Stands
  • Double Downdd

To turn off card counter type "--count" while running in terminal To turn off card sums type "--sums" while running in terminal To turn on card counting bot type "--bot" while running in terminal

To exit the game: Ctrl+C

🔽 Downloads (Self-contained builds)

Unpack the archive and run the executable inside.

🛠️ Build Instructions

Requires .NET SDK 9.0 or later.

git clone https://github.com/porzeraklon/blackjack.git
cd blackjack

Then build for your target OS:

  • 🪟 Windows x64

    dotnet publish -c Release -r win-x64 --self-contained true /p:PublishTrimmed=true
  • 🐧 Linux x64

    dotnet publish -c Release -r linux-x64 --self-contained true /p:PublishTrimmed=true
  • 🍎 macOS x64

    dotnet publish -c Release -r osx-x64 --self-contained true /p:PublishTrimmed=true

🙋 About

This project was created as a clean, educational example of implementing game logic in a cross-platform CLI environment using .NET. Contributions and forks are welcome.

About

Cross-platform Blackjack game for the terminal, written in C#. Self-contained & open source (GPL-3.0).

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages