Skip to content

wongston/blackjack

Repository files navigation

Blackjack (Single Player) – MVP

A minimalist single-player Blackjack built with React + Vite. Uses 3 combined decks (156 cards), core rules (Hit, Stand, Bust, Blackjack), dealer logic, and simple betting/payouts.

Run locally

npm install
npm run dev

Web3 (Thirdweb Connect)

  1. Install deps (one-time):
npm install @thirdweb-dev/react @thirdweb-dev/chains ethers
  1. Create an .env.local file in the project root with:
VITE_THIRDWEB_CLIENT_ID=YOUR_CLIENT_ID
  1. Start dev:
npm run dev

Build for production:

npm run build
npm run preview

Gameplay

  • Place a bet (bankroll starts at 1000)
  • Player and dealer receive two cards (dealer second card hidden)
  • Player can Hit or Stand
  • Dealer reveals and hits to 17+
  • Payouts:
    • Win: 1:1
    • Blackjack: 3:2 (push if dealer also blackjack)
    • Push: bet returned
    • Loss/Bust: bet lost

Notes

  • Cards are dealt from 3 shuffled decks per hand (no repeats within a hand).
  • No splits, double, surrender, or insurance in this MVP.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published