A simple Blackjack game built with HTML, CSS, and JavaScript. The game allows a player to play against the dealer, where they can choose to "Hit" or "Stand" to achieve a hand closer to 21 than the dealer without going over.
- Shuffle and deal cards randomly.
- Player can "Hit" to get another card or "Stand" to end their turn.
- The dealer will play automatically and must hit until they reach 17 or more.
- Handles Aces as either 1 or 11.
- Displays the result of the game (win, lose, or tie).
- Betting System
-
Clone this repository to your local machine:
git clone https://github.com/Glory42/Blackjack-Game.git
-
Navigate to the project folder:
cd blackjack-game
-
Open the
index.html
file in your browser:open index.html # For macOS start index.html # For Windows
Alternatively, you can simply double-click the
index.html
file to open it in your browser.
- Hit: Draws another card from the deck.
- Stand: Ends your turn and shows the dealer's cards.
- HTML for the structure of the page.
- CSS for styling the game interface.
- JavaScript for the game logic, including deck creation, card shuffling, and gameplay control.
- Advanced Mechanics
- Visual Enhancements
This project is licensed under the MIT License - see the LICENSE file for details.
Enjoy the game, and feel free to contribute if you'd like to enhance it further!