Giter Club home page Giter Club logo

blackjack_java's Introduction

Blackjack_java

This game of blackjack runs in consol.

The value of cards two through ten is their pip value (2 through 10). Face cards (Jack, Queen, and King) are all worth ten. Aces can be worth one or eleven. A hand's value is the sum of the card values.

The dealer plays hard seventeen strategy - must hit until the cards total up to 17 points. At 17 points or higher, the dealer must stay.

You are betting that you have a better hand than the dealer. The better hand is the hand where the sum of the card values is closer to 21 without exceeding 21. The detailed outcome of the hand follows:  

  • If the player exceeds a sum of 21 ("busts") and dealer has 21 or less - the player loses. 
  • If the dealer exceeds 21 ("busts") and the player does not; the player wins. 
  • If the player attains a final sum higher than the dealer and does not bust; the player wins. 
  • If both dealer and player bust or receive a blackjack or any other hands with the same sum, called a "push", no one wins.
  • If the player is dealt an Ace and a ten-value card, and the dealer does not, the player wins and receives a bonus. 

After receiving an initial two cards, the player has up to four standard options: "hit", "stay", "double", or "split". 

  • Hit: Take another card from the dealer. 
  • Stay: Take no more cards. 
  • Double: The player is allowed to increase the initial bet by 100% in exchange for committing to stand after receiving exactly one more card. The option is available only when the player has two cards. 
  • Split: If the first two cards of a hand have the same value, the player can split them into two hands, separates the two cards and draws an additional card on each, placing one bet with each hand. The player then plays out the two separate hands in turn. They are treated as independent new hands, with the player winning or losing their wager separately for each hand. In the case of ten-valued cards, player is allowed splitting only when the cards have identical ranks; for instance, a hand of 10-10 may be split, but not one of 10-king.

blackjack_java's People

Contributors

lglowka avatar

Watchers

 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.