Giter VIP home page Giter VIP logo

cards-react-tsx's Introduction

Installation

1 - Clone this github repo: git clone [email protected]:stuart-robinson/cards-react-tsx.git

2 - Install required packages: yarn (or npm)

3 - Run the local dev server with yarn start

4 - Run the test suit with yarn test

Rules

  • This is a simplified version of BlackJack so there are only two players the 'player' and the 'dealer'. There is also no gambling!
  • The game is played with a deck of 52 cards
  • At the start of the game the deck is shuffled and two cards are dealt to the player and the dealer
  • Play begins with the player. The following choices available to the player:
    • "Stand": Player stays put with their cards.
    • "Hit": Player draws another card. If this card causes the player's total points to exceed 21 ("bust") then they will lose.
  • After the player has had their turn, the dealer will turn over their first card.
  • If the dealer has a score of 16 or less then the dealer must take another card

Result

  • If the player or the dealer goes over 21 then they will 'bust' and lose.
  • If no player has bust then the player with the higher point total will win.
  • If both players have the same score the result is a draw unless one player has blackjack in which case they win.

Scoring

  • Aces may be counted as 1 or 11 points. The higher value applies if it does not cause the player to go over 21
  • Cards 2 to 9 points are same as face value (e.g 5 = 5 points)
  • Ten, Jack, Queen and King cards count as ten points.
  • The value of a hand is the sum of the point values of the individual cards. Except, a "blackjack" is the highest hand, consisting of one ace and any 10-point card, and it outranks all other 21-point hands.

cards-react-tsx's People

Contributors

nikkichristofi avatar stuart-robinson avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

macandersonuche

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.