Skip to content

iamvanja/react-blackjack

Repository files navigation

Blackjack

This is a blackjack app built using ES6 classes for game logic which are then rendered using React as a view layer. The build tool used is Webpack.

Blackjack GIF

Details

  • Dealer must hit on soft 17
  • Single Deck. The deck is shuffled every 6 rounds.
  • Player is not allowed to split cards.
  • Keep track of win percentage for the player.

Getting started

Step 1. Make sure that you have Node.js v6 or newer and ideally Yarn installed on your machine (npm is fine too).

Step 2. Install project dependencies listed in package.json by running:
yarn install or npm install

Step 3. Compile and launch the app by running:
yarn start or npm start

Step 4. Open the app at http://localhost:8080/

Tests

To run tests, run yarn test(:watch) or npm test(:watch), :watch being an option.

Documentation

To see documentation, run yarn docs or npm run docs.

Demo

Demo can be seen at http://vanja.gavric.org/playground/blackjack/.

Sources

Aside from third-party code listed in package.json, this third-party material/tools is used:

To-do

  • Write more tests
  • Potentially further encapsulate game logic in the Game class
  • Optimize for mobile / small screen
  • Implement main layout based on Flexbox
  • Implement better production build (image optimization, index.html,...)
  • Animate dealer's second card flip
  • Animate game outcome; deck score
  • Implement nicer card design (inspired by http://helveticards.ryanmyers.me/)

About

This is a blackjack app built using ES6 classes for game logic which are then rendered using React as a view layer. The build tool used is Webpack.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published