Git Product home page Git Product logo

kalohq-challenge's Introduction

Blackjack

The aim of this exercise is to create a simple React-powered game of Blackjack. This should be a single-player game played against an AI dealer.

Your game must follow the following simple set of rules:

  1. There is a standard set of 52 cards. When the game starts, the player is given 2 random cards and the dealer is given one which the player can see. Each numbered card has its face value, the ace can be either 1 or 11 and picture cards are worth 10 points.
  2. The player is given the following 2 options: ‘hit’ or ‘stick’.
  3. The player can hit or stick until they are either happy with the sum of the values of their cards or until the total of their cards add up to 21 or over. If their hand is over 21, they lose. Otherwise, if they stick, the dealer will then start drawing cards until they either have a closer total to 21. If the dealer goes over then the player wins.

There will be a follow up task building on top of what you produce here in the next interview.

Get going

  1. Install with npm install
  2. Start the dev server with npm start
  3. Build your application out of ./src/components/app/app.js
  4. Tests (npm test) found in **/__tests__/*.test.js will be run with jest

Tips

  • This app was bootstrapped with create-react-app. Find the docs here!
    • Feel free to eject if you want!
  • We've provided a few atom components for you to get going quickly with.
  • We are not expecting an overly-polished UI. The purpose of this exercise is to see how you model the various concepts of the game inside the application and how you design your code.
  • We've installed the following packages for your convenience (feel free to use at will, ignore or install more)

Once you're done

Run npm run build and then pack up your entire project in a zip folder and ping it back over to us! :)

Thanks

Peter Tripp for providing the deck of cards

kalohq-challenge's People

Contributors

hansonrb avatar

Watchers

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