Skip to content

AJamesGit01/simple-blackjack-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-blackjack-game

  • The Blackjack Game is a simple web-based game where a player tries to draw cards whose total value is as close as possible to 21 without going over. This game simulates a single-player experience against the rules of blackjack (not against a dealer).

Game Rules

  • The goal is to get a sum of 21 with your cards.

  • An Ace (A) is worth 11 points.

  • Jack (J), Queen (Q), and King (K) are worth 10 points.

  • All other cards (2–10) are worth their face value.

  • You can draw new cards to try to improve your score.

  • If your total goes over 21, you lose the game.

  • If you reach exactly 21, you win – Blackjack!

  • You can reset the game at any time.

Features

  • Generates random cards using getRandomCard() function.

  • Displays current cards and total sum.

  • Shows messages like:

  • "Do you want to draw a new card?"

  • "You've got Blackjack!"

  • "You're out of the game!"

Buttons:

  • START GAME – starts a new game with 2 cards.

  • NEW CARD – draws a new card if you're still playing.

  • RESET GAME – resets the game state.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published