This is a simple web-based Blackjack game built with HTML, CSS, and JavaScript. It allows players to compete against the dealer in an interactive and visually appealing interface. The goal is to achieve a hand value as close to 21 as possible without exceeding it, while beating the dealer's hand.
- Interactive Gameplay: Players can choose to "Hit" or "Stand" to improve their hand.
- Dealer Mechanics: The dealer follows standard Blackjack rules for decision-making.
- Responsive Design: Optimized for both desktop and mobile devices.
- Smooth Animations: Cards are dealt with animations to enhance the gaming experience.
- HTML: Provides the structure and content for the game interface.
- CSS: Adds styling, animations, and layout design.
- JavaScript: Implements game logic, card handling, and user interaction.
- Deal: The game begins with both you and the dealer receiving two cards.
- Hit or Stand: You can choose to:
- Hit: Draw another card to improve your hand.
- Stand: Stop drawing cards and end your turn.
- Dealer's Turn: The dealer automatically draws cards until their hand value is at least 17.
- If your hand value exceeds 21, you lose.
- If the dealer's hand value exceeds 21, you win.
- If your hand value is closer to 21 than the dealer's without exceeding 21, you win.
- If both hands are equal, it's a tie.
- Clone the repository to your local machine:
git clone https://github.com/your-username/blackjack-game.git
- Open the
index.html
file in your web browser to start playing.
blackjack-game/
│
├── index.html # Main HTML file
├── styles.css # Styles for the game
├── script.js # JavaScript logic for the game
└── README.md # Project documentation
- User Interface: Displays cards for both the player and the dealer, with interactive buttons like 'Hit' and 'Stand'.
- Animations: Smooth card-dealing animations enhance user engagement.
- Responsive Layout: The game adapts seamlessly to various screen sizes.
If you want to contribute to this project:
- Fork the repository.
- Create a new branch for your changes.
- Commit your changes and push them to your fork.
- Open a pull request.
This project is open-source and available under the MIT License.
Enjoy playing Blackjack!