Giter Club home page Giter Club logo

blackjack-is-fun's Introduction

Blackjack is Fun

A blackjack web app that I started building on a flight when I was bored :).

Contributing

๐ŸŽ‰ We're thrilled that you're considering contributing to our repository. Before you get started, please take a moment to read through the CONTRIBUTING.md guide to understand how you can contribute.

Demo

You can try out the live demo of the blackjack game here.

Usage

  1. Install dependencies: npm i
  2. Start app: npm run start and navigate to http://localhost:1234 and beat the dealer!

Blackjack

blackjack-is-fun's People

Contributors

jacketattack avatar incognito0989 avatar

Stargazers

 avatar Clint Garn avatar

Watchers

 avatar  avatar

blackjack-is-fun's Issues

Add Betting To Each Hand Of Blackjack

Goal: To increase player engagement by allowing them to manage a bankroll and customize how much they want to bet each hand

Acceptance Criteria

  • With each hand a player is now required to make a bet of exactly $10
  • A player's bet is displayed directly just below the 'Total' text and the action buttons. It should display 'Bet: 10'. The 'Bet:' portion of that should be bold.
    • There is some flexibility on exact location of this. Make sure to include screenshots of this in your pull request so we can review and finalize on exact location.
  • At the start of each game session, a player's bankroll starts at $100
  • A player can see their current bankroll amount listed at the bottom-right of the screen. It should state 'Bankroll: $100' to start.
    • There is some flexibility on exact location of this. Make sure to include screenshots of this in your pull request so we can review and finalize on exact location.
    • Style is up to you but it should not just be basic text. Style it to grab attention!
  • At the start of each game (after the 'New Game' button is clicked) the following steps should occur:
    1. A player's bankroll should have $10 subtracted from it
    • If a player does not have at least $10 in their bankroll, then a new game does not get started
    • For now, a player is forced to refresh the page to begin the game again
    1. The current bet should be displayed next to the player's hand of cards. For now this will always be $10
    2. A new hand is dealt to the player and the game begins as current behavior
    • New Behavior for Split and Double Down Actions
      Split:
      • To be able to split a user also must now have at least the original bet amount (for now $10) in their bankroll. If not the button remains disabled
      • For each new hand that is opened, the bet amount on that hand (again, for now is $10) will be displayed next to the hand just like in the original hand of cards
        Double Down:
      • To be able to double down a user also must now have at least the original bet amount (for now $10) in their bankroll. If not the button remains disabled
    1. After hands end, for each hand the player wins, add the bet amount to their bankroll.

Out Of Scope

  • Storing bankroll beyond current browser session. If the user refreshes the page or opens the game in a new tab, the expectation is that this is a 'fresh start' and their bankroll again starts at $100.
  • Allowing user to customize how much they want to bet each hand. It is hardcoded to $10 to start. Followup feature to add buttons to modify that per hand. Given this feature will follow, avoid hardcoding 10 into codebase for bet amount. Parameterize it

Game Should Appear Like A Real Blackjack Table

Goal: Build immersive blackjack experience for our users.

Acceptance Criteria:

  • The background image of the game should look like a real blackjack table
  • It should contain spots for up to 7 hands to play simultaneously. This should be represented by white, rectangular boxes.
  • Across the middle of the board should be three lines of text:
    • BLACKJACK PAYS 3 TO 2
    • DEALER MUST HIT ON 16 AND STAND ON ALL 17s
    • INSURANCE PAYS 2 TO 1
  • There should be open space in top of page for the dealer's hand to be displayed

See this image for inspiration
image

Active Community desperate for new updates!

I absolutely LOVE this app and agree black jack is good ole fashion FUN! I'm ~3,000 hours into this game and have a yearning for more features and improved graphics/animations. Is there any game updates in the near future? Thanks for this amazing game!

Introduce React Testing Library & Initial Test Of Game Scenario

Goal: Automatically know when we break expected behavior of a blackjack game

Acceptance Criteria

  • Introduce react testing library as a dependency of the game
  • Add a test file app.test.tsx that will cover testing different game scenarios with components rendered
  • Add a test for the following scenario
    1. dealer is dealt 7 + 10 (7 is showing)
    2. player is dealt two kings (for 20 total)
    3. assert on visibility of hands in dealer and player
    4. click on 'stand' button
    5. assert that dealer shows 17 and does not hit
    6. assert on game showing player won the game

Add drink ladies to simulate real Vegas (baby) experience

Include a main menu where you can select the following:

  • your budget (really this is optional as it should be ignored completely)
  • what casino you want to play at
    • Jerry's Golden Nugget
    • The Palms
    • etc.

Based on the Casino location the user selects, have drink ladies appear on the sides of the UI asking if you would like a refreshment. Ensure that drink ladies are close to accurate depending on the location selected (@breadboardbasics can provide more detail here)

Add simulated alcohol impairment

As the game progresses, increase difficulty of selecting player's intended move. Possibilities could include blurred buttons, moving buttons, changed colors, shifting the order of buttons...

Deduct a small amount from player's cumulative earnings (function still in development) periodically to simulate tipping server.

Define Home For Developer Contribution Guidelines

Goal: Documented how one can contribute to this repo including patterns and best practices we follow

Acceptance Criteria

  • There exists a CONTRIBUTING.md file in the root of the repo that contains the following:
    • Table of contents section with entries for each of below sections
    • Welcome section that includes purpose of this product
    • Environment details. Step-by-step guide on how to setup local development environment
    • Testing. Our automated and manual testing expectations for new features and bugfixes
    • How to create a new issue. Define what labels should be placed on what issues
    • Guidance on picking up an issue to contribute
      • include guidance on branch and commit naming convention
      • branch should include issue number
      • commit message should be 'X: ' where X is the issue number and message is in the imperative tense following how to write a good git commit
  • Update the README to link to this for all contributing related content
  • Look to other open-source repos and resources like this one covering atom for inspiration and ideas

How do I run this???

I love black jack and think it is fun too! I would love to play but I don't know how to run it!!

Please add a README! I'm also interested in becoming a contributor....how would I go about this?

Your fellow black jack lover,
MouseCop

Update Deck To Be A Six-Deck Shoe

Goal: Deck is realistic and has a finite size.

Acceptance Criteria

  • The 'deck' we are drawing from is a collection of six, standard 52 card decks of cards.
  • Update deck.ts so that it builds a six-deck shoe if one does not exist. It continually draws from the top of that deck until we penetrate 75% of the way through the shoe. At that point, a new six-deck shoe should be built and used.
    • When building a new shoe, it should 'shuffle' together 6 decks and store that queue.
    • This check should only happen before a new game is played. It should not 'rebuild' the shoe in the middle of a hand.
    • The number of decks and penetration limit should both be parameterized. For now we will use 6 and 75% for those.
  • The 'deck' is only persisted in memory. If a user refreshes the page then a new shoe is built.

Add 'New Game' Button That Appears When Current Hands Ends

Goal: Allow user to easily restart a new game of blackjack

Acceptance Criteria

  • When a hand of blackjack finishes - regardless of outcome - a button should appear that when clicked will deal a new hand to dealer and player
    • button color should be lightskyblue

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.