Blackjack Game

Group #2 – Jian Mejia, Christian Perez, Sean Perez

Game Preview

Blackjack Game Screenshot

Team Roles

Requirements & Setup

Card images are sourced from Google Code’s Vector Playing Cards archive.

Game Flow

The overall flow is managed through Tkinter frames (scrnTitle, scrnBlackjack, scrnStats):

  1. Title Screen: Player enters starting balance and begins the game:contentReference[oaicite:0]{index=0}.
  2. Betting Window: Player chooses how much to bet. Validation ensures the bet is within the balance:contentReference[oaicite:1]{index=1}.
  3. Initial Deal: Player and dealer each get 2 cards. Dealer’s second card is hidden:contentReference[oaicite:2]{index=2}.
  4. Player Turn: Player can Hit (draw) or Stand (end turn). Aces are handled as 1 or 11:contentReference[oaicite:3]{index=3}.
  5. Dealer Turn: Dealer reveals hidden card and must draw until ≥16:contentReference[oaicite:4]{index=4}.
  6. Result: Balance updates depending on outcome (Blackjack, Win, Loss, Push):contentReference[oaicite:5]{index=5}.
  7. Stats Screen: Shows Rounds Won/Lost. Option to Play Again resets counters:contentReference[oaicite:6]{index=6}.

Card Mechanics & Display

The deck is represented as a cardArray of Tkinter Label objects, each linked with:

Cards are drawn randomly from cardArray and removed once dealt, preventing duplicates.

Ace logic: totals are calculated both with Ace as 1 and Ace as 11; the best valid hand ≤21 is chosen as bestHand:contentReference[oaicite:9]{index=9}.

Betting & Balance System

balance tracks the player’s money. tempBalance and tempBet store Entry widget inputs. The bettingWindow ensures valid wagers before cards are dealt:contentReference[oaicite:10]{index=10}.

Results update balance accordingly:

Outcomes & Rules

Stats & End Screen

Wins, losses, and total rounds are tracked as roundsWon, roundsLost, roundsPlayed. After running out of balance, the Stats screen shows totals and offers “Play Again”:contentReference[oaicite:19]{index=19}.