My second try to made BlackJack, this version compared to v1 is more extensive (you can start new game without reloading page).
I created this game as a task from part of course on udemy (course about OPP in JavaScript).
There are two ways to play in this game:
- player vs player,
- player vs AI - I only created one function to handle AI
Round - to win round player must score 21 points or have more points than opponent (if everyone has less than 21 points). Every time when you start next round, the deck is shuffle and when croupier deals the cards he will takes the last four cards from array of cards.
Win game - to win game player (or AI) need to lead opponent to bankruptcy.
Take card - every time when player will decide to take one card, he will pay 50$ for it and croupier/dealer will give him the last card from deck.
Stay - when player chooses to stay, he don't do anything in round and he will wait for opponent moves.
I used in this project:
- JavaScript (OPP),
- Sass,
- HTML,
- some GSAP (to create input and output animations).
LIVE: ** https://kacpernlp.github.io/BlackJack-v2/ **
status of project: finished.