9/3/2019
AT Blog Recap: Black Jack
1) For this project, we were given the task of making a blackjack game over the summer. While at first this project might seem simple, in fact it is quite difficult because you have to make a deck of cards, find a way to deal the cards, and have it all adhere to the rules of the game.
2) Heading in to this project the only thing that I knew how to do was make a deck of cards. This is because last year in “Coding I” we made one for a project. Other than that it was mostly all trial and error. When I would encounter a problem I would head to google and try to find a solution. Websites like Stack Overflow and w3 school proved to be very helpful at solving my problems. My organization in this project was not the greatest it could have been and in the next project I plan on spending more time making sure my code is readable and organized properly.
3) My createCard function is simple, but i am really proud about how it turned out in my code. Arguably my biggest problem with the first try at blackjack was the fact that I just had words for what my cards were and I did not have images. First I renamed all of my card stuff to match the file names of the deck images. After that, I added the first line which looks for the specific card picture in the image folder of the project. Then, the size of the image is set along with a margin, and finally the image is pushed to the game.
4) For me making the deck was easy because I already had my Khan Academy javascript deck from last year. The hardest part for me was getting images for the cards because initially I did not know how to reference the object inside of an array and have it relate to an image inside of a folder. Thankfully my classmates were there to help me work through it and the problem was resolved.
5) If I were to go and continue working on my project I would want to focus on the games “feel” and add things like a dealer who is animated constantly in the background who delivers the game instructions. I would also tweak some of my css and make sure that the music would work with all browsers ( it is really finicky).
Link to the project: https://drive.google.com/open?id=167zjEdjLKBbtUcath1soBQx-B44DWvXZ