This is a web-based implementation of the classic casino card game Blackjack (also known as 21), where you play against the computer dealer.
- 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
- Open the
index.html
file in your web browser. - Click the "New Game" button to start a round.
- Two cards will be dealt to you and two to the dealer (one face up, one face down).
- Decide whether to "Hit" (draw another card) or "Stand" (keep your current hand).
- Try to get as close to 21 as possible without going over.
- After you stand, the dealer will play according to standard rules.
- The player closer to 21 without going over wins the round.
- 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
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.
- Add betting features with chips
- Implement split and double down options
- Add multi-player support
- Include sound effects and improved animations
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.
This project is licensed under the MIT License.