Skip to content

This is a simple Blackjack (21) card game created using Java Swing and JFrame for the GUI. The game allows a user to play against a computer dealer. The objective is to get a hand total as close to 21 as possible, without going over.

Notifications You must be signed in to change notification settings

pratikkhot100/Black-jack-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

♠️♥️🃏 Black-jack-game

🔍 Game Description:

This is a simple Blackjack (21) card game created using Java Swing and JFrame for the GUI. The game allows a user to play against a computer dealer. The objective is to get a hand total as close to 21 as possible, without going over.


🎯 Game Objective:

  • Player tries to beat the dealer by getting a hand value closest to 21.
  • Cards 2–10 are worth their face value.
  • Face cards (J, Q, K) are worth 10.
  • Aces can be 1 or 11, depending on which is better for the hand.

📸 Screenshot:

Screenshot 2025-04-10 120231

Screenshot 2025-04-10 120301


🛠️ Tech Stack:

  • Java SE (8+)
  • Swing (GUI)
  • AWT (for graphics and event handling)

⚙️ Game Features:

GUI built using Java Swing components (JFrame, JButton, JLabel, etc.).

  • User can: Hit (draw a card) Stand (end their turn) Dealer draws until it reaches 17 or more.

  • Game displays: Player and dealer cards Result (win, lose, draw)


📄 How the Game Works (Flow):

Game starts, deck is shuffled. Both player and dealer get 2 cards (dealer shows 1 card). Player can Hit (get more cards) or Stand. If player's hand goes over 21 → Busted!

  • After player stands, dealer plays: Dealer hits until reaching at least 17.

  • Compare hands: Highest hand ≤ 21 wins.


📞 Contact Information

🐙 GitHub: https://github.com/pratikkhot100

💼 LinkedIn: https://www.linkedin.com/in/pratikkhot01

📧 Email: pratikkhot1207@gmail.com

About

This is a simple Blackjack (21) card game created using Java Swing and JFrame for the GUI. The game allows a user to play against a computer dealer. The objective is to get a hand total as close to 21 as possible, without going over.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages