Skip to content

kathykam/QBlackjack

Repository files navigation

Blackjack Game

This is a web-based implementation of the classic casino card game Blackjack (also known as 21), where you play against the computer dealer.

Blackjack Game Screenshot

Features

  • Classic Blackjack gameplay against a computer dealer
  • Standard card deck with proper suit and rank display
  • Dealer follows official casino rules (hits until 17+)
  • Interactive hit and stand options
  • Score tracking for both player and dealer
  • Blackjack detection (21 with first two cards)
  • Proper bust detection and scoring rules
  • Animated card dealing for a more engaging experience

How to Play

  1. Open the index.html file in your web browser.
  2. Click the "New Game" button to start a round.
  3. Two cards will be dealt to you and two to the dealer (one face up, one face down).
  4. Decide whether to "Hit" (draw another card) or "Stand" (keep your current hand).
  5. Try to get as close to 21 as possible without going over.
  6. After you stand, the dealer will play according to standard rules.
  7. The player closer to 21 without going over wins the round.

Game Rules

  • Number cards (2-10) are worth their face value
  • Face cards (J, Q, K) are worth 10
  • Aces are worth 1 or 11, whichever is more favorable
  • If you go over 21, you "bust" and lose immediately
  • The dealer must hit until they have 17 or higher
  • You win if your final score is higher than the dealer's or if the dealer busts

Project Structure

  • index.html: Contains the structure and user interface of the game.
  • style.css: Defines the styling for the game interface.
  • script.js: Contains the JavaScript code that handles the game logic.
  • src/: Directory containing component files and helpers.

Future Enhancements

  • Add betting features with chips
  • Implement split and double down options
  • Add multi-player support
  • Include sound effects and improved animations

Contributing

Contributions to this project are welcome. If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published