Giter Site home page Giter Site logo

blackjack's Introduction

Blackjack

URL: http://shiiba.github.io/blackjack/blackjack.html

Description

Final project for Unit 1 of General Assembly's Web Development Immersive. Built after 2 weeks of HTML/CSS, Javascript & JQuery. Our prompt was to build Blackjack using what we've learned so far with static front-end & JS programming (actual prompt can be found in blackjack.md).

Before I started building this project, I went through a few different planning steps. You can see the initial planning docs in the Planning folder. After planning out my initial MVP scope and writing user stories, I sketched out the objects I needed to build, and an initial pass at the gameflow & functions necessary to play the game. I then converted the user stories into a non-functional skeleton of pseudo-coded functions with comments describing the desired functionality. Then, I started to code out the MVP.

Overall, I'm pretty happy with how this came out after 2.5 days of work. Below, you can see a list of future features I would have loved to tackle if I had more time.

Tech used

  • HTML / CSS
  • Javascript / JQuery
  • CSS Sprites
  • (All done in memory; no database)

Features

  • Players, Cards & Decks using OOP
  • Text prompts & game log to guide user through game flow
  • Fisher-Yates Shuffle deck function (w/ casino-style 5 decks)
  • Cards displayed through Sprites
  • Player Bankroll to keep track of wins/losses
  • Ability to input desired bet amount
  • Normal play with Hit / Stay / Bust
  • Dynamic Ace value optimization
  • Payout based on your hand vs. dealers
  • Lose the game if your bankroll is cleaned out
  • Reshuffle a new deck if shuffled cards run out
  • Blackjack check & 3/2 payout
  • Ability to double down
  • Ability to split (3/4 implemented; payout is still buggy)
  • Dealer has one card faced down
  • Dealer's face down card isn't inspectable
  • Deal card & split hand animations

Future Features (if time allowed)

  • Refactor out the alerts and make the game flow happen fully in-browser
  • Error handling for user inputs
  • Check so you can't bet more than you have in the bank
  • Insurance check function
  • Break out everything into classes, encapsulate functions using more OOP JS
  • Some special animation when you win money / get blackjack
  • Game stats (win percentage; win/loss tracking)

Libraries

blackjack's People

Contributors

shiiba avatar

Watchers

James Cloos 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.