This is a simple Blackjack game application where you can play against the computer as a single player. The goal is to get a hand with a total value as close to 21 as possible without exceeding it.
- You will see the player's name and chips displayed on the screen.
- Click the "Start Game" button to begin the game.
- Two initial cards will be dealt to you.
- The sum of the cards will be displayed along with the individual cards.
- You have the option to draw a new card by clicking the "New Card" button.
- The sum will be updated with the newly drawn card.
- If the sum exceeds 21, you lose the game and it will be displayed.
- If the sum is exactly 21, you win with a Blackjack!
- You can continue drawing cards until you decide to stop or reach a sum of 21.
- After each game, you have the option to start a new game by clicking "Start Game" again.
- HTML
- CSS
- JavaScript
During the development of this project, I learned:
- How to use objects in JavaScript to represent players and their attributes.
- How to generate random numbers to simulate card draws in a game.
- How to update and display the game state using the DOM.
- How to handle game logic and conditions, such as checking for Blackjack or bust.
- How to use loops and arrays to manage and display cards in the game.