For the Blackjack assignment you need to create a single hand for a dealer.
- The initial cards must be randomly assigned from a "deck" that exists as an array.
- If the dealer's hand adds up to 16 or less, the dealer should take another card.
- You should check to see if one card is an Ace and adjust it's value if the dealer busts. (Aces are worth 11 or 1)
- If the dealers hand is 17, 18, 19, 20, or 21 the Dealer should not take another card.
- If the dealers hand is higher than 21, (after adjusting any aces) the dealer busts.
- Display the result of the hand onto the page.
- *Your page does NOT need to have a button. In fact, do not use a button yet.
- It's very easy to overthink this assignment. Remember you are not creating a blackjack game, you are creating an automatic single hand.
- Draw a flow chart on a piece of paper to help visualize the process.
view this page's source code to see example code.
The Black Jack assignment
Card 1:
Card 2:
Total:
You do not need to have a button on your page. You may use refresh (f5) to play again.
back to index