Giter VIP home page Giter VIP logo

project01_blackjack's Introduction

project01_blackJack

I created a blackjack game using html css and javascript. This game can be installed using the link below.

http://afreem66.github.io/project01_blackJack/blackJack/

My thought process when creating this game was to using a construcotr functions to create a deck of card objects, views, and players. Each card had a rank, value, and suit property. From there I added methods to each instance of the cards to find the value of the cards, and add them to a players hand.

Each player has a hand object, which contained 2 seperate arrays for aces and non-aces. I did this so I could deal with the issue of aces having multiple values depending on the sum of the hand.

Lastly, I created a few functions that included the logic that dictate the game. Rules for the dealer, and to determine winners and losers.

ALl of these functions are callable by pressing the hit, stay, or deal buttons, which I have added event listeners to listen for clicks.

Some of the issues I had were creating the card views. If I could do this differently I would make sure to use a sprite sheet to create card images. This was very difficult and I wish to go back to this and work on. I also want to add animations to announce winners and show the cards moving to a players hand. Most importantly, I need to make the dealer's first card and also make the game able to deal more than 1 hand and have the card views and values correspond.

This project was incredibly gratifying and terrifying. I impressed myself but aso know I can do more to make this a better project and look forward to doing so in the coming days./

project01_blackjack's People

Contributors

phantomphildius avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.