Skip to content

A blackjack game demonstrating use of jQuery, JavaScript, HTML, and CSS

Notifications You must be signed in to change notification settings

ryanhikel/blackjack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript BlackJack

Link to live game: http://js-blackjack.surge.sh/

Technologies used: Ive used jQuery for dom selection along with HTML and CSS to display my game. I created the dealers logic through the use of JavaScript which also is used in the functions for creating/ shuffling the deck as well as dealing cards to both the player and dealer. I also used the site Animista for the animation that slid in the cards.

Approach taken: My original plan was to push the cards directly onto the page and calculate the totals based on that. I had problems with that method and thanks to some help from the instructors I changed my method to using objects to store most of my data and do all the work in Javascript.

Challenges: One of the biggest ongoing problems I have had was toggling the value of the ace which was supposed to be equal to 1 or 11 depending on the total value I ended up trying several different functions to accomplish this and I believe it is working now.

Unsolved problems: One issue that caused me more trouble than I expected was the CSS. I found that using flexbox was not as clear to me as I originally thought and I needed to look up more on it but I was still unable to make everything stay where it was supposed to when objects were added or removed. Looking at other projects I wonder if I should have attempted to reset my CSS prior to applying any flexbox. Another challenge I had that I was unable to solve was flipping the dealers card over with a css animation. I used another animation from Animista however no matter how I applied it the card would flip upside down.

I would definitely like more time on this project to learn from my mistakes and improve on every aspect as I become more comfortable with it. Id also like to try to remake the game in pure JavaScript since I need practice.

About

A blackjack game demonstrating use of jQuery, JavaScript, HTML, and CSS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published