Code Monkey home page Code Monkey logo

poker-dealer's Introduction

Poker-Dealer

This program is for learning propose. It help to people that want to practice its criteria hands in poker. The program give a random hand (five cards) to the user and CPU, then user determines who is the winner.

Here are the values from highest to lowest (from https://www.telegraph.co.uk/betting/casino-guides/poker/hand-rankings-chart-cheat-sheet/):

  1. Royal flush: The royal flush is the best hand available in poker. It features five consecutive cards, all of the same suit, in order of value from 10 through to ace. Example: [10♥, J♥, Q♥, K♥, A♥]

  2. Straight flush: Any five cards of successive values in the same suit that’s not a royal flush is a straight flush. A royal flush or a straight flush with cards of higher ranking are the only hands that can beat a straight flush. Example: [4♣, 5♣, 6♣, 7♣, 8♣]

  3. Four of a Kind: Four of the same card in the four suits. The five-card hand is completed by the highest card among the others on the table or in your hand. Example: [A♣, A♠, A♥, A♦, 8♠]

  4. Full house: Three of the same value card in three different suits plus a different pair of the same rank card in two different suits in one hand. If more than just one player has a full house the player with the highest value three of a kind will win the hand. Example: [Q♠, Q♥, Q♣, 6♦, 6♠]

  5. Flush: Five cards of the same suit in no particular order. If more than one player has a flush, the hand with the highest valued card will win. Example: [4♦, 8♦, 6♦, 7♦, 2♦]

  6. Straight: Five cards of consecutive numerical value composed of more than one suit. An ace can normally rank as low (below a 2) or high (above a king) but not at the same time in one hand. Example: [3♠, 4♥, 5♦, 6♣, 7♥]

  7. Three of a kind: A poker hand containing three cards of the same rank in three different suits. The two highest available cards besides the three of a kind complete the hand. Example: [K♠, K♥, K♣, 5♠,8♦]

  8. Two pair: Two different sets of two cards of matching rank. The highest-ranked left available card completes the hand. Example: [9♠, 9♥, 3♣, 5♦,5♦]

  9. Pair: A pair of cards of the same rank in different suits. The remainder of the hand is formed from the three highest-ranked cards available. Example: [9♠, 10♥, 6♣, 6♠, 2♦]

  10. High card: The lowest-ranked hand available. The highest card in the hand is your ‘best hand’. In this case it's the king of spades. Example: [4♠, 6♥, K♣, 8♠, 3♦]

poker-dealer's People

Contributors

oscarsanders 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.